I don't know if it's really compatible with 2.4, looks like other distributions are using really different configs :(
It's not compatible.. there's probably a nicer way to do the config than running a separate instance of apache, too. I didn't look very hard, but I don't see why it couldn't install a conf file to /etc/apache2/modules.d like most other web apps.
this is the last uncompatible package with 2.4 :(, but I haven't found what config should we use... :/
Maybe we should revbump and quickly stabilize a new version of backuppc that depends on <apache-2.4?
BackupPC depends on mod_perl, which also doesn't support apache-2.4 at the moment. However mod_perl has its dependency on <apache-2.4, so at least transitively, BackupPC depends on apache-2.2.
Because of the transitive dependency, this shouldn't block apache-2.4 stabilization, but I would feel a little bit better if BackupPC depended on <apache2.4 itself.
latest mod_perl also supports apache-2.4... then, we should try to port this last one (as all the distributions made years ago) instead of needing to keep 2.2 forever
I checked the links in Description. Both seem to be apache 2.4 compatible now. The first one even has comments for it, and the second one doesn't seem to have any compatible stuff. I didn't try it, I'm not using the software. Just for the heads up.
Sorry, wanted to say "the second one doesn't seem to have any incompatible stuff"
Oh, ignore me, totally misunderstood the whole thing :( I see the instance config in the files folder now which contains an apache 2.2 config.
Do we just need a 2.4 compatible httpd.conf and be done with it for now, or we need an overhaul for this one?
We could provide a httpd.conf which works both with 2.2 and 2.4:
The only difficulty comes from the LoadModule section at the top, where we cannot use that logic there. Maybe we could detect the apache version from the init script, and add an extra -D option like -D APACHE2_2 or -D APACHE2_4 , and do <IfDefine> directives in the config instead. Then it would become like:
The problematic sections would be the Order and Allow directives. Changes would look like this:
Allow from all
#2.4 condition not needed, we have a require directive already
Options Indexes FollowSymlink
Allow from all
Require all granted
The LoadModules section also needs to be tweaked like this. A good starting point would be for the APACHE2_4 branch a default 2.4 config.
Detecting apache version from init script:
apache2 -V | sed -r 's@^.*Apache/([0-9]+)\.([0-9]+).*$@-D APACHE\1_\2@' | fgrep -- '-D APACHE'
Maybe having one version supporting apache-2.2 and other for 2.4 would be easier :/
Anyway, it looks like Fedora is able to make it work with both versions:
(In reply to Pacho Ramos from comment #11)
> Anyway, it looks like Fedora is able to make it work with both versions:
Fedora gets to cheat, because they build Apache. So they know that mod_authz_core will be there for apache-2.4 in,
# Apache 2.4 stuff
Gentoo users can disable that module with a USE flag, although it's not advised.
There's no reason for BackupPC to have its own httpd.conf -- I think it will work just fine with a small vhost configuration like most of the other webapps. I just need to sit down and write one from scratch one day when I get time.
OK, thanks for the explanation :)
Created attachment 414580 [details]
Created attachment 414582 [details]
OK, this is the best I could do. First, I dropped all of the webapp stuff. It's pointless -- you can only run one daemon on the system, so you can't really host separate websites to admin the one instance. I also added a few missing die statements.
Next, I figured out why this had its own httpd.conf: the web server needs to run as the "backuppc" user and not as "apache". I actually don't see how we were better off than if we had just used "apache" to run the daemon. Nevertheless, it's a bad solution (and upstream's fault for requiring it). But now, with apache-2.4, we have a better way. The mpm_itk module lets you run a virtual host as a separate user/group!
So, I undid most of the apache stuff in the ebuild, and made it install a tiny conf file (99_backuppc.conf) that can be enabled with "-D BACKUPPC" in APACHE2_OPTS. The new vhost runs as backuppc/backuppc, and only listens on 127.0.0.1:8080 so it won't interfere with any existing sites (hopefully).
There's some slight configuration needed now (mentioned in the elog), but I think the end result is a lot better. Caveat: none of this works without the new mod_perl.
This still needs some work, by the way, I'm just sick of working on it =)
Some of the deps could use updating, and I'm sure there are some more APACHE2_MODULES we need (like auth_basic).
The new mod_perl is done, so this is basically ready. @app-backup, can I commit this after a little cleanup so that we have something working with apache-2.4?
I would go ahead directly as looks like @app-backup is not really taking care of this package :|
(In reply to Michael Orlitzky from comment #17)
> The new mod_perl is done, so this is basically ready. @app-backup, can I
> commit this after a little cleanup so that we have something working with
Speaking as one of the few devs on the @app-backup alias Michael feel free to go ahead with it.
Ok, I committed this last night with a catch: I misinterpreted what happened with mod_perl, so the only version (mod_perl-2.0.10_pre201601) that will work with the new backuppc is masked. As a result, backuppc-3.3.1 is masked until we can get a newer version of mod_perl unmasked.
Dilfridge suggested to me that the newer revisions of mod_perl-2.0.8 should work, but I haven't been able to get them to work in my testing. So that might be fixable, or the masked version mod_perl-2.0.10* should get unmasked kinda soon for perl-5.22. Either way it will get taken care of eventually.
So, I'm going to mark this fixed -- we now have a version of backuppc whose config supports apache-2.4. I'll worry about the details in the remaining bugs.