Re: apache2 issues
On 23 September 2014 17:58, Jeroen Dekkers jer...@dekkers.ch wrote: Isn't that an implementation detail? Is Python version relevant for the on-the-wire WSGI protocol? WSGI is an API, not a wire protocol. The Python version of the WSGI server would also be the Python version the code is run under, so we must distinguish between Python 2 and 3. The best way would probably be to specify that httpd-wsgi is for Python 2 and create a httpd-wsgi3 virtual package for Python 3. How do we make this change? Does this require reopening #588497 and/or creating a new bug against debian-policy? -- Brian May br...@microcomaustralia.com.au
Re: apache2 issues
On 29 July 2014 19:04, Jeroen Dekkers jer...@dekkers.ch wrote: As far as I can see this is a bug in the apache2 packaging. The httpd virtual package should be provided by the apache2 package, not the apache2-bin package, because the apache2-bin package doesn't provide a working webserver. Bug report I just filed about this: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=756361 Ok, this bug was fixed, leading me to re-investigate this again. It isn't very easy to specify what httpd-wsgi should mean, because some WSGI servers are full webservers with WSGI support such as apache and others like gunicorn are only supposed to run behind a proxying server such as apache or nginx (similar to for example php-fpm). So as far as I can see, the correct dependency should be: Depends: libapache2-mod-wsgi | httpd-wsgi, apache2 | httpd So it also possible to run other webservers. I just noticed there is still another potential problem. With the above, either libapache2-mod-wsgi (Python2 only) or libapache2-mod-wsgi-py3 (Python3 only) will satisfy the depends. Does this mean I should also depend on both python-* and python3-*? Even though only one will ever get used? What happens if the package only has Python2 or Python3 support, not both? To me, it is starting to look like we need two virtual packages for httpd-wsgi - one for Python2, and one for Python3. Then I can explicitly set use one my Depends (e.g. Python3), and not worry about supporting the other Python version (e.g. Python2). -- Brian May br...@microcomaustralia.com.au
Re: apache2 issues
Quoting Brian May (2014-09-23 08:02:22) On 29 July 2014 19:04, Jeroen Dekkers [1]jer...@dekkers.ch wrote: As far as I can see this is a bug in the apache2 packaging. The httpd virtual package should be provided by the apache2 package, not the apache2-bin package, because the apache2-bin package doesn't provide a working webserver. Bug report I just filed about this: [2]https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=756361 Ok, this bug was fixed, leading me to re-investigate this again. It isn't very easy to specify what httpd-wsgi should mean, because some WSGI servers are full webservers with WSGI support such as apache and others like gunicorn are only supposed to run behind a proxying server such as apache or nginx (similar to for example php-fpm). So as far as I can see, the correct dependency should be: Depends: libapache2-mod-wsgi | httpd-wsgi, apache2 | httpd So it also possible to run other webservers. I just noticed there is still another potential problem. With the above, either libapache2-mod-wsgi (Python2 only) or libapache2-mod-wsgi-py3 (Python3 only) will satisfy the depends. Does this mean I should also depend on both python-* and python3-*? Even though only one will ever get used? What happens if the package only has Python2 or Python3 support, not both? To me, it is starting to look like we need two virtual packages for httpd-wsgi - one for Python2, and one for Python3. Then I can explicitly set use one my Depends (e.g. Python3), and not worry about supporting the other Python version (e.g. Python2). Isn't that an implementation detail? Is Python version relevant for the on-the-wire WSGI protocol? - Jonas -- * Jonas Smedegaard - idealist Internet-arkitekt * Tlf.: +45 40843136 Website: http://dr.jones.dk/ [x] quote me freely [ ] ask before reusing [ ] keep private signature.asc Description: signature
Re: apache2 issues
At Tue, 23 Sep 2014 08:51:56 +0200, Jonas Smedegaard wrote: Quoting Brian May (2014-09-23 08:02:22) On 29 July 2014 19:04, Jeroen Dekkers [1]jer...@dekkers.ch wrote: As far as I can see this is a bug in the apache2 packaging. The httpd virtual package should be provided by the apache2 package, not the apache2-bin package, because the apache2-bin package doesn't provide a working webserver. Bug report I just filed about this: [2]https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=756361 Ok, this bug was fixed, leading me to re-investigate this again. It isn't very easy to specify what httpd-wsgi should mean, because some WSGI servers are full webservers with WSGI support such as apache and others like gunicorn are only supposed to run behind a proxying server such as apache or nginx (similar to for example php-fpm). So as far as I can see, the correct dependency should be: Depends: libapache2-mod-wsgi | httpd-wsgi, apache2 | httpd So it also possible to run other webservers. I just noticed there is still another potential problem. With the above, either libapache2-mod-wsgi (Python2 only) or libapache2-mod-wsgi-py3 (Python3 only) will satisfy the depends. Does this mean I should also depend on both python-* and python3-*? Even though only one will ever get used? What happens if the package only has Python2 or Python3 support, not both? To me, it is starting to look like we need two virtual packages for httpd-wsgi - one for Python2, and one for Python3. Then I can explicitly set use one my Depends (e.g. Python3), and not worry about supporting the other Python version (e.g. Python2). Isn't that an implementation detail? Is Python version relevant for the on-the-wire WSGI protocol? WSGI is an API, not a wire protocol. The Python version of the WSGI server would also be the Python version the code is run under, so we must distinguish between Python 2 and 3. The best way would probably be to specify that httpd-wsgi is for Python 2 and create a httpd-wsgi3 virtual package for Python 3. Jeroen Dekkers -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/87wq8uhio5.wl%jer...@dekkers.ch
Re: apache2 issues
Quoting Brian May (2014-07-30 02:54:10) On 29 July 2014 19:04, Jeroen Dekkers [1]jer...@dekkers.ch wrote: As far as I can see this is a bug in the apache2 packaging. The httpd virtual package should be provided by the apache2 package, not the apache2-bin package, because the apache2-bin package doesn't provide a working webserver. Bug report I just filed about this: [2]https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=756361 [...] A policy bug about what httpd-wsgi should provide is still open however: [3]https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=588497 It isn't very easy to specify what httpd-wsgi should mean, because some WSGI servers are full webservers with WSGI support such as apache and others like gunicorn are only supposed to run behind a proxying server such as apache or nginx (similar to for example php-fpm). Thanks for the BTS references. Looks like I should keep using libapache2-mod-wsgi, apache2 for now, but be prepared to change this depending on what happens with #756361. So as far as I can see, the correct dependency should be: Depends: libapache2-mod-wsgi | httpd-wsgi, apache2 | httpd So it also possible to run other webservers. Yes, that looks good to me. Suspect the actual line may depend on what happens with #588497. You might then want to formally second that phrasing, then - i.e. sharing your opinion at the bugreport (I just did so myself), thanks to your raising awareness :-) . - Jonas -- * Jonas Smedegaard - idealist Internet-arkitekt * Tlf.: +45 40843136 Website: http://dr.jones.dk/ [x] quote me freely [ ] ask before reusing [ ] keep private signature.asc Description: signature
Re: apache2 issues
[ ⏰ 29/07/2014 07:55 ] [ ✎ Wouter Verhelst ] Op dinsdag 29 juli 2014 10:51:45 schreef Brian May: So ideally I only want to depend on libapache2-mod-wsgi if apache2 is installed, but this is not possible. Sure it is. Depends: apache2 | libapache2-mod-wsgi, apache2 | httpd is perfectly legal and will do what you want. You surely meant |httpd | libapache2-mod-wsgi, apache2 | httpd| . signature.asc Description: OpenPGP digital signature
Re: apache2 issues
On 29 July 2014 16:02, Jean-Christophe Dubacq jcduba...@free.fr wrote: You surely meant httpd |libapache2-mod-wsgi, apache2 | httpd . Not convinced that will work. e.g. if apache-bin is already installed, that will satisfy the httpd dependency, so it won't look at libapache2-mod-wsgi. -- Brian May br...@microcomaustralia.com.au
Re: apache2 issues
Jean-Christophe Dubacq wrote: [ ⏰ 29/07/2014 07:55 ] [ ✎ Wouter Verhelst ] Op dinsdag 29 juli 2014 10:51:45 schreef Brian May: So ideally I only want to depend on libapache2-mod-wsgi if apache2 is installed, but this is not possible. Sure it is. Depends: apache2 | libapache2-mod-wsgi, apache2 | httpd is perfectly legal and will do what you want. You surely meant httpd | libapache2-mod-wsgi, apache2 | httpd . That won't work either, because the Apache webserver itself satisfies httpd, so that expression won't enforce the installation of libappache2-mod-wsgi. - Josh Triplett -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20140729063436.GA497@thin
Re: apache2 issues
Op dinsdag 29 juli 2014 08:02:43 schreef Jean-Christophe Dubacq: [ ⏰ 29/07/2014 07:55 ] [ ✎ Wouter Verhelst ] Op dinsdag 29 juli 2014 10:51:45 schreef Brian May: So ideally I only want to depend on libapache2-mod-wsgi if apache2 is installed, but this is not possible. Sure it is. Depends: apache2 | libapache2-mod-wsgi, apache2 | httpd is perfectly legal and will do what you want. You surely meant |httpd | libapache2-mod-wsgi, apache2 | httpd| . No, I don't. What brian really wants is apache2 or apache2-bin. In the case of apache2-bin, he needs an additional dependency on libapache2-mod-wsgi. Really, it should be apache2 | libapache2-mod-wsgi, apache2 | apache2-bin to do so. If other webservers can provide a suitable WSGI implementation, then the apache2-bin can be replaced with httpd again, and the first list could include those WSGI implementations as other alternatives. But you shouldn't be confused into reading the first as list of suitable webserver implementations. The first is a list of suitable WSGI implementations; the second is a list of suitable webserver implementations. There is some overlap, which is why double dependencies are fine, but they don't serve the same purpose. -- It is easy to love a country that is famous for chocolate and beer -- Barack Obama, speaking in Brussels, Belgium, 2014-03-26 signature.asc Description: This is a digitally signed message part.
Re: apache2 issues
On 29 Jul 2014 16:44, Wouter Verhelst w...@uter.be wrote: No, I don't. What brian really wants is apache2 or apache2-bin. In the case of apache2-bin, he needs an additional dependency on libapache2-mod-wsgi. Really, it should be apache2 | libapache2-mod-wsgi, apache2 | apache2-bin to do so. Not sure I see how this is any better than just: libapache2-mod-wsgi, apache2 (Which is what lintian warned me against using) Installing libapache2-mod-wsgi and apache2-bin without apache2 is insufficient, for Apache support to work, I need /usr/share/apache2/apache2-maintscript-helper which requires apache2 to be installed. So we can replace that 2nd term with just apache2. Similarly, installing apache2 without libapache2-mod-wsgi would meet your depends but not really be satisfactory. Either way, it sounds like I should be ignoring Lintian.
Re: apache2 issues
Brian May wrote: * apache2-reverse-dependency-calls-invoke-rc.d - due to legacy fall back code that restarts Apache2.2 automatically. Yeah, I'm overriding this one too. * non-standard-apache2-configuration-name - due to the fact I need to supply different configuration files for apache2.2 and apache2.4 in /etc/apache2/conf-available, as the access control requirements have changed and this was the recommended solution on the debian-python mailing list. Really? No. Use IfVersion in one shared config file. At least that's what I've been told, and what makes sense to me. bye, //mirabilos -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/lr7mp7$ngk$1...@ger.gmane.org
Re: apache2 issues
On 29 July 2014 18:42, Thorsten Glaser t...@debian.org wrote: No. Use IfVersion in one shared config file. At least that's what I've been told, and what makes sense to me. I wasn't aware of IfVersion. Thanks for the tip. -- Brian May br...@microcomaustralia.com.au
Re: apache2 issues
At Tue, 29 Jul 2014 17:29:46 +1000, Brian May wrote: On 29 Jul 2014 16:44, Wouter Verhelst w...@uter.be wrote: No, I don't. What brian really wants is apache2 or apache2-bin. In the case of apache2-bin, he needs an additional dependency on libapache2-mod-wsgi. Really, it should be apache2 | libapache2-mod-wsgi, apache2 | apache2-bin to do so. Not sure I see how this is any better than just: libapache2-mod-wsgi, apache2 (Which is what lintian warned me against using) Installing libapache2-mod-wsgi and apache2-bin without apache2 is insufficient, for Apache support to work, I need /usr/share/apache2/apache2-maintscript-helper which requires apache2 to be installed. So we can replace that 2nd term with just apache2. As far as I can see this is a bug in the apache2 packaging. The httpd virtual package should be provided by the apache2 package, not the apache2-bin package, because the apache2-bin package doesn't provide a working webserver. Bug report I just filed about this: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=756361 Similarly, installing apache2 without libapache2-mod-wsgi would meet your depends but not really be satisfactory. Either way, it sounds like I should be ignoring Lintian. No, lintian is correct and should not be ignored. Depending on only apache2 makes it hard to run other webservers. There is a also httpd-wsgi virtual package: https://packages.debian.org/sid/httpd-wsgi A policy bug about what httpd-wsgi should provide is still open however: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=588497 It isn't very easy to specify what httpd-wsgi should mean, because some WSGI servers are full webservers with WSGI support such as apache and others like gunicorn are only supposed to run behind a proxying server such as apache or nginx (similar to for example php-fpm). So as far as I can see, the correct dependency should be: Depends: libapache2-mod-wsgi | httpd-wsgi, apache2 | httpd So it also possible to run other webservers. Kind regards, Jeroen Dekkers -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/878unco7rv.wl%jer...@dekkers.ch
Re: apache2 issues
On 29 July 2014 09:40, Brian May br...@microcomaustralia.com.au wrote: if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then . /usr/share/apache2/apache2-maintscript-helper apache2_invoke enconf package.conf elif dpkg-query -f '${Version}' -W 'apache2.2-common' /dev/null 21 ; then # if the configuration uses IfVersion uncomment the next line # a2enmod -q version [ -d /etc/apache2/conf.d/ ] [ ! -l /etc/apache2/conf.d/package.conf ] ln -s ../conf-available/package.conf /etc/apache2/conf.d/package.conf fi Like I said, that 2nd condition doesn't seem to work correctly, and comes with a false positive in sid if apache2-bin is installed (I still don't understand this). Maybe something like (full postinst file): === cut === #!/bin/sh -e apache_force_reload() { if apache2ctl configtest 2/dev/null; then invoke-rc.d apache2 restart || true else echo Your apache2 configuration is broken, please fix it and restart apache2 manually. fi } if [ $1 = configure ]; then if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then . /usr/share/apache2/apache2-maintscript-helper apache2_invoke enconf package.conf elif command -v apache2 /dev/null apache2 -v | sed -n 's/^Server version: //p' | grep -q 'Apache/2.2'; then ln -sf ../conf-available/package.conf /etc/apache2/conf.d/package.conf apache_force_reload fi fi #DEBHELPER# === cut === It appears to work both on wheezy and sid. The ln -sf might be an oversimplification, will fail if the sysadmin has deleted /etc/apache2/conf.d - I consider this unlikely however. Possibly #DEBHELPER# should come first. It also appears that a2enmod -q version is not required, and generates an error, both on wheezy and sid, so I removed that comment. -- Brian May br...@microcomaustralia.com.au
Re: apache2 issues
On 29 July 2014 19:04, Jeroen Dekkers jer...@dekkers.ch wrote: As far as I can see this is a bug in the apache2 packaging. The httpd virtual package should be provided by the apache2 package, not the apache2-bin package, because the apache2-bin package doesn't provide a working webserver. Bug report I just filed about this: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=756361 [...] A policy bug about what httpd-wsgi should provide is still open however: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=588497 It isn't very easy to specify what httpd-wsgi should mean, because some WSGI servers are full webservers with WSGI support such as apache and others like gunicorn are only supposed to run behind a proxying server such as apache or nginx (similar to for example php-fpm). Thanks for the BTS references. Looks like I should keep using libapache2-mod-wsgi, apache2 for now, but be prepared to change this depending on what happens with #756361. So as far as I can see, the correct dependency should be: Depends: libapache2-mod-wsgi | httpd-wsgi, apache2 | httpd So it also possible to run other webservers. Yes, that looks good to me. Suspect the actual line may depend on what happens with #588497. -- Brian May br...@microcomaustralia.com.au
apache2 issues
Hello, Just noticed some issues with my web application package, and not sure what to do about them, or who to contact. Apologies if these issues have already been discussed, the other threads seem to focus around upgrading binary modules (at quick glance). First, my package triggered the following Lintian warning: https://lintian.debian.org/tags/web-application-should-not-depend-unconditionally-on-apache2.html Fair enough, change that depends to depends on apache2 | httpd. However, now when I install it, for reasons I don't understand, apt-get prefers to install apache2-bin over apache2 (thought it should default to the first item???). This provides httpd and satisfies the depends. apache2 is required for Apache 2.4 configuration, as only it provides /usr/share/apache2/apache2-maintscript-helper. (side note: if I change the depends back to apache2, it works fine) Fine, so my package should install, but without configuring Apache, right? Not so fast. I used the something similar to the excerpt from https://wiki.debian.org/Apache2Transition#Should_we_support_a_transitional_fallback_configuration_which_allows_web_apps_to_work_with_both_2.2_and_2.4_packages to automatically fallback to Apache2.2 configuration if Apache2.4 not installed (I still need to be able to support wheezy installs): if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then . /usr/share/apache2/apache2-maintscript-helper apache2_invoke enconf package.conf elif dpkg-query -f '${Version}' -W 'apache2.2-common' /dev/null 21 ; then # if the configuration uses IfVersion uncomment the next line # a2enmod -q version [ -d /etc/apache2/conf.d/ ] [ ! -l /etc/apache2/conf.d/package.conf ] ln -s ../conf-available/package.conf /etc/apache2/conf.d/package.conf fi The problem here is that the dpkg-query succeeds if apache2-bin is installed (it just doesn't print a version): (sid)root@aquitard:/home/brian/tree/django/karaage/karaage# dpkg-query -f '${Version}' -W 'apache2.2-common' echo successful successful (sid)root@aquitard:/home/brian/tree/django/karaage/karaage# dpkg --purge apache2-bin (Reading database ... 18140 files and directories currently installed.) Removing apache2-bin (2.4.10-1) ... Processing triggers for man-db (2.6.7.1-1) ... (sid)root@aquitard:/home/brian/tree/django/karaage/karaage# dpkg-query -f '${Version}' -W 'apache2.2-common' echo successful dpkg-query: no packages found matching apache2.2-common I don't understand this. Yes, the above script also checks for the existence of /etc/apache2/conf.d/, however just because this directory exists doesn't mean apache2.2 is still installed. Other issues: Also still getting Lintian warnings for * apache2-reverse-dependency-calls-invoke-rc.d - due to legacy fall back code that restarts Apache2.2 automatically. * non-standard-apache2-configuration-name - due to the fact I need to supply different configuration files for apache2.2 and apache2.4 in /etc/apache2/conf-available, as the access control requirements have changed and this was the recommended solution on the debian-python mailing list. Probably will have to override these. -- Brian May br...@microcomaustralia.com.au
Re: apache2 issues
On 29 July 2014 09:40, Brian May br...@microcomaustralia.com.au wrote: Fair enough, change that depends to depends on apache2 | httpd. However, now when I install it, for reasons I don't understand, apt-get prefers to install apache2-bin over apache2 (thought it should default to the first item???). This provides httpd and satisfies the depends. apache2 is required for Apache 2.4 configuration, as only it provides /usr/share/apache2/apache2-maintscript-helper. Oh, Just worked out what is happening here. My depends contained: ..., libapache2-mod-wsgi, apache2 | httpd, ... Which curiously, lintian was happy with. libapache2-mod-wsgi requires apache2-api-20120211 which is provided by apache2-bin, which gets installed. I assume apt-get then looks at the next dependency, see it is already satisfied (apache2-bin provides httpd), and skips it. So ideally I only want to depend on libapache2-mod-wsgi if apache2 is installed, but this is not possible. Think I will go back to my previous plan of creating an -apache package that is just for configuring Apache access, have it depend both on libapache2-mod-wsgi and apache2, and ignore the web-application-should-not-depend-unconditionally-on-apache2 Lintian warning this generates. If you use another webserver, you don't need to install the -apache package. -- Brian May br...@microcomaustralia.com.au
Re: apache2 issues
Op dinsdag 29 juli 2014 10:51:45 schreef Brian May: So ideally I only want to depend on libapache2-mod-wsgi if apache2 is installed, but this is not possible. Sure it is. Depends: apache2 | libapache2-mod-wsgi, apache2 | httpd is perfectly legal and will do what you want. -- It is easy to love a country that is famous for chocolate and beer -- Barack Obama, speaking in Brussels, Belgium, 2014-03-26 -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/3142909.hlm5nlr...@grep.be