Debian Bug report logs - #798430
apache2: please add systemd service file

version graph

Package: apache2; Maintainer for apache2 is Debian Apache Maintainers <debian-apache@lists.debian.org>; Source for apache2 is src:apache2 (PTS, buildd, popcon).

Reported by: Arturo Borrero Gonzalez <aborrero@cica.es>

Date: Wed, 9 Sep 2015 09:51:01 UTC

Severity: wishlist

Tags: patch

Fixed in version apache2/2.4.23-5

Done: Raphaël Hertzog <hertzog@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian Apache Maintainers <debian-apache@lists.debian.org>:
Bug#798430; Package apache2. (Wed, 09 Sep 2015 09:51:05 GMT) (full text, mbox, link).


Acknowledgement sent to Arturo Borrero Gonzalez <aborrero@cica.es>:
New Bug report received and forwarded. Copy sent to Debian Apache Maintainers <debian-apache@lists.debian.org>. (Wed, 09 Sep 2015 09:51:05 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Arturo Borrero Gonzalez <aborrero@cica.es>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: apache2: please add systemd service file
Date: Wed, 09 Sep 2015 11:26:26 +0200
Package: apache2
Severity: wishlist

Dear maintainers,

thanks for your work on this important pacakge. It's really appreciated.

Current apache2 package lacks of systemd service file (though is well
integrated with systemd due to glue scripts)

I would like to have a native systemd service file. Among other things,
we can benefit of:
 * systemd security features (i.e ProtectHome= and ProtectSystem= and more)
 * watchdog capabilities by systemd

There are lot of basic apache2 systemd service files in the net to get ideas for
debian one, for example (needs to be debianized, of course):

========= 8< =========
[Unit]
Description=Apache 2 HTTP Web Server
After=network.target

[Service]
Type=forking
EnvironmentFile=/etc/conf.d/apache2
ExecStart=/usr/sbin/apache2 -k start $APACHE2_OPTS
ExecStop=/usr/sbin/apache2 -k graceful-stop $APACHE2_OPTS
ExecReload=/usr/sbin/apache2 -k graceful $APACHE2_OPTS
PIDFile=/var/run/apache2.pid
StandardOutput=syslog
StandardError=syslog
Restart=always
ProtectHome=yes
ProtectSystem=full

[Install]
WantedBy=multi-user.target
WantedBy=http-daemon.target
========= 8< =========

best regards.



Information forwarded to debian-bugs-dist@lists.debian.org, Debian Apache Maintainers <debian-apache@lists.debian.org>:
Bug#798430; Package apache2. (Mon, 29 Feb 2016 21:09:07 GMT) (full text, mbox, link).


Acknowledgement sent to Stefan Fritsch <sf@sfritsch.de>:
Extra info received and forwarded to list. Copy sent to Debian Apache Maintainers <debian-apache@lists.debian.org>. (Mon, 29 Feb 2016 21:09:07 GMT) (full text, mbox, link).


Message #10 received at 798430@bugs.debian.org (full text, mbox, reply):

From: Stefan Fritsch <sf@sfritsch.de>
To: 798430@bugs.debian.org
Subject: Re: Bug#798430: apache2: please add systemd service file
Date: Mon, 29 Feb 2016 21:49:39 +0100
This is not that easy because of all the logic that we have in the 
init script.

One part is about starting/stopping htcacheclean if mod_cache_disk is 
enabled. Maybe instead of doing this check at apache2 startup, this 
could be split into a separate service and a2enmod could active the 
htcacheclean service when mod_cache_disk is enabled.

Another part is that apache2 is not very good at telling its status 
via an exit code. For example, when doing reload/stop/graceful-stop, 
the controlling apache2 process will only send a signal and not wait 
for the result of the operation. I don't know enough about systemd to 
tell if this can be easily done via unit files.

Also, some configuration is done via /etc/apache2/envvars and 
/etc/default/apache2 . This would need to be taken care of, too.





Information forwarded to debian-bugs-dist@lists.debian.org, Debian Apache Maintainers <debian-apache@lists.debian.org>:
Bug#798430; Package apache2. (Sat, 19 Mar 2016 12:57:04 GMT) (full text, mbox, link).


Acknowledgement sent to Timo Aaltonen <tjaalton@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Apache Maintainers <debian-apache@lists.debian.org>. (Sat, 19 Mar 2016 12:57:05 GMT) (full text, mbox, link).


Message #15 received at 798430@bugs.debian.org (full text, mbox, reply):

From: Timo Aaltonen <tjaalton@debian.org>
To: 798430@bugs.debian.org
Subject: Re: Bug#798430: apache2: please add systemd service file
Date: Sat, 19 Mar 2016 14:55:25 +0200
[Message part 1 (text/plain, inline)]
Hi, attached is a diff that adds systemd support, derived from Fedora
and modified to suit Debian better.

On Mon, 29 Feb 2016 21:49:39 +0100 Stefan Fritsch <sf@sfritsch.de> wrote:
> This is not that easy because of all the logic that we have in the 
> init script.
> 
> One part is about starting/stopping htcacheclean if mod_cache_disk is 
> enabled. Maybe instead of doing this check at apache2 startup, this 
> could be split into a separate service and a2enmod could active the 
> htcacheclean service when mod_cache_disk is enabled.

Yes, htcacheclean as a separate unit makes sense, and 'dh_systemd_enable
--no-enable' installs it disabled by default here. a2enmod should then
run 'systemctl enable htcacheclean.service' but I've left that out since
my perl is rusty..

> Another part is that apache2 is not very good at telling its status 
> via an exit code. For example, when doing reload/stop/graceful-stop, 
> the controlling apache2 process will only send a signal and not wait 
> for the result of the operation. I don't know enough about systemd to 
> tell if this can be easily done via unit files.

Systemd handles that just fine AIUI. There will be additional
integration possibilities with apache 2.5 which has mod_systemd, but the
current unit works fine for now.

> Also, some configuration is done via /etc/apache2/envvars and 
> /etc/default/apache2 . This would need to be taken care of, too.

/etc/default/apache2 seems to be mostly for htcacheclean, and envvars
would be deprecated with this move because it's not just a config file
listing variables but something that a shell script should import. But
the unit file can set the defaults, changes would then be managed
"natively" via /etc/systemd/system/apache2.service.d/*.

I've tried to support extra instances too but that's untested. Enabling
an instance would just mean to drop a symlink like
/etc/systemd/system/apache2.target.wants/apache2@-foo.service ->
/lib/systemd/system/apache2@.service

I haven't tested it though, but a similar approach works great with
389-ds-base and pki-server.


-- 
t
[systemd-integration.diff (text/x-diff, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Apache Maintainers <debian-apache@lists.debian.org>:
Bug#798430; Package apache2. (Sat, 26 Mar 2016 08:09:03 GMT) (full text, mbox, link).


Acknowledgement sent to Stefan Fritsch <sf@sfritsch.de>:
Extra info received and forwarded to list. Copy sent to Debian Apache Maintainers <debian-apache@lists.debian.org>. (Sat, 26 Mar 2016 08:09:04 GMT) (full text, mbox, link).


Message #20 received at 798430@bugs.debian.org (full text, mbox, reply):

From: Stefan Fritsch <sf@sfritsch.de>
To: Timo Aaltonen <tjaalton@debian.org>
Cc: 798430@bugs.debian.org
Subject: Re: Bug#798430: apache2: please add systemd service file
Date: Sat, 26 Mar 2016 09:06:23 +0100
Hi Timo,

thanks for your help.

There are a few more things to consider here. We will still have to 
support using sysv-init and init scripts. Also, in practice, support 
for apache2 in Debian/Ubuntu is mostly done on upstream mailing lists. 
And people expect that apachectl will work correctly. Because of these 
reasons, it makes sense to not deviate too much between systemd and 
sysv-init, if possible.


On Saturday 19 March 2016 14:55:25, Timo Aaltonen wrote:
 
> > Also, some configuration is done via /etc/apache2/envvars and
> > /etc/default/apache2 . This would need to be taken care of, too.
> 
> /etc/default/apache2 seems to be mostly for htcacheclean, and
> envvars would be deprecated with this move because it's not just a
> config file listing variables but something that a shell script
> should import. But the unit file can set the defaults, changes
> would then be managed "natively" via
> /etc/systemd/system/apache2.service.d/*.

Because of the things outlined above, I think the systemd unit should 
still use the envvars file. Probably this is best achieved by calling 
apachectl instead of apache2 directly.

> 
> I've tried to support extra instances too but that's untested.
> Enabling an instance would just mean to drop a symlink like
> /etc/systemd/system/apache2.target.wants/apache2@-foo.service ->
> /lib/systemd/system/apache2@.service

Using such a template service file for extra instances seems like the 
correct approach.


> I haven't tested it though, but a similar approach works great with
> 389-ds-base and pki-server.

I will take a stab at separating htcacheclean in the init script and 
adding a2enmod support. This is a necessary first step for adding unit 
files.

Cheers,
Stefan




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Apache Maintainers <debian-apache@lists.debian.org>:
Bug#798430; Package apache2. (Sun, 27 Mar 2016 15:42:03 GMT) (full text, mbox, link).


Acknowledgement sent to Timo Aaltonen <tjaalton@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Apache Maintainers <debian-apache@lists.debian.org>. (Sun, 27 Mar 2016 15:42:03 GMT) (full text, mbox, link).


Message #25 received at 798430@bugs.debian.org (full text, mbox, reply):

From: Timo Aaltonen <tjaalton@debian.org>
To: Stefan Fritsch <sf@sfritsch.de>
Cc: 798430@bugs.debian.org
Subject: Re: Bug#798430: apache2: please add systemd service file
Date: Sun, 27 Mar 2016 18:39:51 +0300
26.03.2016, 10:06, Stefan Fritsch kirjoitti:
> Because of the things outlined above, I think the systemd unit should 
> still use the envvars file. Probably this is best achieved by calling 
> apachectl instead of apache2 directly.

Sure thing, looks like it works just fine with apache2ctl and then can
also drop Environment=* from the unit file.

>> I haven't tested it though, but a similar approach works great with
>> 389-ds-base and pki-server.
> 
> I will take a stab at separating htcacheclean in the init script and 
> adding a2enmod support. This is a necessary first step for adding unit 
> files.

Cool, looking forward to that.


-- 
t



Information forwarded to debian-bugs-dist@lists.debian.org, Debian Apache Maintainers <debian-apache@lists.debian.org>:
Bug#798430; Package apache2. (Mon, 19 Sep 2016 15:54:04 GMT) (full text, mbox, link).


Acknowledgement sent to Raphael Hertzog <hertzog@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Apache Maintainers <debian-apache@lists.debian.org>. (Mon, 19 Sep 2016 15:54:04 GMT) (full text, mbox, link).


Message #30 received at 798430@bugs.debian.org (full text, mbox, reply):

From: Raphael Hertzog <hertzog@debian.org>
To: Timo Aaltonen <tjaalton@debian.org>
Cc: 798430@bugs.debian.org
Subject: Re: Bug#798430: apache2: please add systemd service file
Date: Mon, 19 Sep 2016 17:50:56 +0200
Hi,

On Sat, 19 Mar 2016, Timo Aaltonen wrote:
> I've tried to support extra instances too but that's untested. Enabling
> an instance would just mean to drop a symlink like
> /etc/systemd/system/apache2.target.wants/apache2@-foo.service ->
> /lib/systemd/system/apache2@.service

I don't see any apache2@.service unit in the patch you attached?
Can you share it?

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer

Support Debian LTS: http://www.freexian.com/services/debian-lts.html
Learn to master Debian: http://debian-handbook.info/get/



Information forwarded to debian-bugs-dist@lists.debian.org, Debian Apache Maintainers <debian-apache@lists.debian.org>:
Bug#798430; Package apache2. (Mon, 19 Sep 2016 15:54:07 GMT) (full text, mbox, link).


Acknowledgement sent to Raphael Hertzog <hertzog@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Apache Maintainers <debian-apache@lists.debian.org>. (Mon, 19 Sep 2016 15:54:07 GMT) (full text, mbox, link).


Message #35 received at 798430@bugs.debian.org (full text, mbox, reply):

From: Raphael Hertzog <hertzog@debian.org>
To: Stefan Fritsch <sf@sfritsch.de>
Cc: Timo Aaltonen <tjaalton@debian.org>, 798430@bugs.debian.org
Subject: Re: Bug#798430: apache2: please add systemd service file
Date: Mon, 19 Sep 2016 17:52:55 +0200
Hi Stefan,

On Sat, 26 Mar 2016, Stefan Fritsch wrote:
> I will take a stab at separating htcacheclean in the init script and 
> adding a2enmod support. This is a necessary first step for adding unit 
> files.

I saw that there is now an "apache-htcacheclean" init script. We should
thus be able to complete the systemd support. I'm going to work on this
as we really want apache2 in stretch to have a unit file so that we can
benefit from all the systemd features for Apache too.

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer

Support Debian LTS: http://www.freexian.com/services/debian-lts.html
Learn to master Debian: http://debian-handbook.info/get/



Information forwarded to debian-bugs-dist@lists.debian.org, Debian Apache Maintainers <debian-apache@lists.debian.org>:
Bug#798430; Package apache2. (Wed, 21 Sep 2016 09:30:04 GMT) (full text, mbox, link).


Acknowledgement sent to Raphael Hertzog <hertzog@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Apache Maintainers <debian-apache@lists.debian.org>. (Wed, 21 Sep 2016 09:30:04 GMT) (full text, mbox, link).


Message #40 received at 798430@bugs.debian.org (full text, mbox, reply):

From: Raphael Hertzog <hertzog@debian.org>
To: Stefan Fritsch <sf@sfritsch.de>
Cc: Timo Aaltonen <tjaalton@debian.org>, 798430@bugs.debian.org, sathieu@debian.org
Subject: Re: Bug#798430: apache2: please add systemd service file
Date: Wed, 21 Sep 2016 11:28:05 +0200
[Message part 1 (text/plain, inline)]
Control: tags -1 + patch

Hi Stehan,

On Mon, 19 Sep 2016, Raphael Hertzog wrote:
> I'm going to work on this as we really want apache2 in stretch to have a
> unit file so that we can benefit from all the systemd features for
> Apache too.

Please find attached the patches to apply on your git repository. I tested
the resulting packages and it seems to work fine for me:

$ sudo systemctl status apache2
● apache2.service - The Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
   Active: active (running) since Tue 2016-09-20 11:55:28 EDT; 2s ago
  Process: 3683 ExecStop=/usr/sbin/apachectl stop (code=exited, status=0/SUCCESS)
  Process: 3696 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
 Main PID: 3700 (apache2)
    Tasks: 55 (limit: 4915)
   CGroup: /system.slice/apache2.service
           ├─3700 /usr/sbin/apache2 -k start
           ├─3701 /usr/sbin/apache2 -k start
           └─3702 /usr/sbin/apache2 -k start

Sep 20 11:55:28 debian-stretch-desktop systemd[1]: Starting The Apache HTTP Server...
Sep 20 11:55:28 debian-stretch-desktop apachectl[3696]: AH00558: apache2: Could not reliably determine th
Sep 20 11:55:28 debian-stretch-desktop systemd[1]: Started The Apache HTTP Server.
$ sudo systemctl stop apache2
$ sudo systemctl status apache2
● apache2.service - The Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Tue 2016-09-20 11:56:57 EDT; 2s ago
  Process: 3904 ExecStop=/usr/sbin/apachectl stop (code=exited, status=0/SUCCESS)
  Process: 3763 ExecReload=/usr/sbin/apachectl graceful (code=exited, status=0/SUCCESS)
  Process: 3837 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
 Main PID: 3841 (code=exited, status=0/SUCCESS)

Sep 20 11:56:13 debian-stretch-desktop systemd[1]: Starting The Apache HTTP Server...
Sep 20 11:56:13 debian-stretch-desktop apachectl[3837]: AH00558: apache2: Could not reliably determine th
Sep 20 11:56:13 debian-stretch-desktop systemd[1]: Started The Apache HTTP Server.
Sep 20 11:56:57 debian-stretch-desktop systemd[1]: Stopping The Apache HTTP Server...
Sep 20 11:56:57 debian-stretch-desktop apachectl[3904]: AH00558: apache2: Could not reliably determine th
Sep 20 11:56:57 debian-stretch-desktop systemd[1]: Stopped The Apache HTTP Server.

$ sudo systemctl is-enabled apache-htcacheclean.service 
disabled
$ sudo a2enmod cache_disk
Considering dependency cache for cache_disk:
Module cache already enabled
Enabling module cache_disk.
Enabling external service apache-htcacheclean
Synchronizing state of apache-htcacheclean.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable apache-htcacheclean
insserv: warning: current start runlevel(s) (empty) of script `apache-htcacheclean' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `apache-htcacheclean' overrides LSB defaults (0 1 6).
The service will be started on next reboot.
To activate the new configuration, you need to run:
  systemctl restart apache2
  systemctl start apache-htcacheclean
$ sudo systemctl is-enabled apache-htcacheclean.service
enabled
$ sudo systemctl start apache-htcacheclean
$ sudo systemctl status apache-htcacheclean|cat
● apache-htcacheclean.service - Disk Cache Cleaning Daemon for Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache-htcacheclean.service; enabled; vendor preset: enabled)
   Active: active (running) since mar. 2016-09-20 12:56:52 EDT; 27s ago
  Process: 4766 ExecStart=/usr/bin/htcacheclean -d $HTCACHECLEAN_DAEMON_INTERVAL -p $HTCACHECLEAN_PATH -l $HTCACHECLEAN_SIZE $HTCACHECLEAN_OPTIONS (code=exited, status=0/SUCCESS)
 Main PID: 4767 (htcacheclean)
    Tasks: 1 (limit: 4915)
   CGroup: /system.slice/apache-htcacheclean.service
           └─4767 /usr/bin/htcacheclean -d 120 -p /var/cache/apache2/mod_cache_disk -l 300M -n

sept. 20 12:56:52 debian-stretch-desktop systemd[1]: Starting Disk Cache Cleaning Daemon for Apache HTTP Server...
sept. 20 12:56:52 debian-stretch-desktop systemd[1]: Started Disk Cache Cleaning Daemon for Apache HTTP Server.


I tested the multi-instance support as well:

$ sudo sh /usr/share/doc/apache2/examples/setup-instance dev
Setting up /etc/apache2-dev ...
systemd is in use, no init script installed
use the 'apache2@dev.service' service to control your new instance
sample commands:
systemctl start apache2@dev.service
systemctl enable apache2@dev.service
Setting up symlinks: a2enmod-dev a2dismod-dev a2ensite-dev a2dissite-dev a2enconf-dev a2disconf-dev apache2ctl-dev
Setting up /etc/logrotate.d/apache2-dev and /var/log/apache2-dev ...
Setting up /etc/default/apache-htcacheclean-dev
$ sudo vim /etc/apache2-dev/ports.conf 
$ sudo systemctl start apache2@dev.service
$ sudo systemctl status apache2@dev.service
● apache2@dev.service - The Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache2@.service; disabled; vendor preset
   Active: active (running) since Tue 2016-09-20 11:48:27 EDT; 5s ago
  Process: 3305 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCE
 Main PID: 3316 (apache2)
    Tasks: 55 (limit: 4915)
   CGroup: /system.slice/system-apache2.slice/apache2@dev.service
           ├─3316 /usr/sbin/apache2 -d /etc/apache2-dev -k start
           ├─3317 /usr/sbin/apache2 -d /etc/apache2-dev -k start
           └─3318 /usr/sbin/apache2 -d /etc/apache2-dev -k start

Sep 20 11:48:27 debian-stretch-desktop systemd[1]: Starting The Apache HTTP Serv
Sep 20 11:48:27 debian-stretch-desktop apachectl[3305]: AH00558: apache2: Could 
Sep 20 11:48:27 debian-stretch-desktop systemd[1]: Started The Apache HTTP Serve
$ sudo a2enmod-dev cache_disk
Considering dependency cache for cache_disk:
Enabling module cache.
Enabling module cache_disk.
Enabling external service apache-htcacheclean@dev.service
Created symlink /etc/systemd/system/multi-user.target.wants/apache-htcacheclean@dev.service -> /lib/systemd/system/apache-htcacheclean@.service.
The service will be started on next reboot.
To activate the new configuration, you need to run:
  systemctl restart apache2@dev.service
  systemctl start apache-htcacheclean@dev.service
$ sudo cp -a /var/cache/apache2/  /var/cache/apache2-dev/
$ sudo systemctl start apache-htcacheclean@dev.service
$ sudo systemctl status apache-htcacheclean@dev.service
● apache-htcacheclean@dev.service - Disk Cache Cleaning Daemon for Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache-htcacheclean@.service; enabled; vendor preset: enabled)
   Active: active (running) since mar. 2016-09-20 13:01:38 EDT; 5s ago
  Process: 4887 ExecStart=/usr/bin/htcacheclean -d $HTCACHECLEAN_DAEMON_INTERVAL -p $HTCACHECLEAN_PATH -l
 Main PID: 4888 (htcacheclean)
    Tasks: 1 (limit: 4915)
   CGroup: /system.slice/system-apache\x2dhtcacheclean.slice/apache-htcacheclean@dev.service
           └─4888 /usr/bin/htcacheclean -d 120 -p /var/cache/apache2-dev/mod_cache_disk -l 300M -n

sept. 20 13:01:38 debian-stretch-desktop systemd[1]: Starting Disk Cache Cleaning Daemon for Apache HTTP 
sept. 20 13:01:38 debian-stretch-desktop systemd[1]: Started Disk Cache Cleaning Daemon for Apache HTTP S


I had to make changes to the postinst to account for the changes of
Default-Start values.

I tested the upgrade from jessie:
$ sudo dpkg -Oi *.deb
(Reading database ... 143819 files and directories currently installed.)
Preparing to unpack apache2_2.4.23-5_amd64.deb ...
Restoring lost conffile /etc/apache2/mods-available/cern_meta.load.
Restoring lost conffile /etc/apache2/mods-available/imagemap.load.
Unpacking apache2 (2.4.23-5) over (2.4.10-10+deb8u7) ...
Preparing to unpack apache2-bin_2.4.23-5_amd64.deb ...
Unpacking apache2-bin (2.4.23-5) over (2.4.10-10+deb8u7) ...
Preparing to unpack apache2-data_2.4.23-5_all.deb ...
Unpacking apache2-data (2.4.23-5) over (2.4.10-10+deb8u7) ...
Skipping unselected package apache2-dbg.
Skipping unselected package apache2-dev.
Skipping unselected package apache2-doc.
Skipping unselected package apache2-suexec-custom.
Skipping unselected package apache2-suexec-pristine.
Preparing to unpack apache2-utils_2.4.23-5_amd64.deb ...
Unpacking apache2-utils (2.4.23-5) over (2.4.10-10+deb8u7) ...
Setting up apache2-bin (2.4.23-5) ...
Setting up apache2-data (2.4.23-5) ...
Setting up apache2-utils (2.4.23-5) ...
Setting up apache2 (2.4.23-5) ...
Installing new version of config file /etc/apache2/apache2.conf ...
Installing new version of config file /etc/apache2/conf-available/security.conf ...
Installing new version of config file /etc/apache2/mods-available/proxy_html.load ...
Installing new version of config file /etc/apache2/mods-available/userdir.conf ...
Installing new version of config file /etc/apache2/sites-available/default-ssl.conf ...
Installing new version of config file /etc/cron.daily/apache2 ...
Installing new version of config file /etc/init.d/apache2 ...
Created symlink /etc/systemd/system/multi-user.target.wants/apache2.service → /lib/systemd/system/apache2.service.
Created symlink /etc/systemd/system/multi-user.target.wants/apache-htcacheclean.service → /lib/systemd/system/apache-htcacheclean.service.
Removing obsolete conffile /etc/bash_completion.d/apache2 ...
insserv: warning: current start runlevel(s) (empty) of script `apache-htcacheclean' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `apache-htcacheclean' overrides LSB defaults (0 1 6).
Processing triggers for systemd (231-4) ...
Processing triggers for man-db (2.7.5-1) ...
$ systemctl status apache-htcacheclean.service 
● apache-htcacheclean.service - Disk Cache Cleaning Daemon for Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache-htcacheclean.service; disabled; vendor preset: enabled)
   Active: inactive (dead)

Then the same with cache_disk enabled:
$ sudo dpkg -Oi *.deb
(Reading database ... 143819 files and directories currently installed.)
Preparing to unpack apache2_2.4.23-5_amd64.deb ...
Restoring lost conffile /etc/apache2/mods-available/cern_meta.load.
Restoring lost conffile /etc/apache2/mods-available/imagemap.load.
Unpacking apache2 (2.4.23-5) over (2.4.10-10+deb8u7) ...
Preparing to unpack apache2-bin_2.4.23-5_amd64.deb ...
Unpacking apache2-bin (2.4.23-5) over (2.4.10-10+deb8u7) ...
Preparing to unpack apache2-data_2.4.23-5_all.deb ...
Unpacking apache2-data (2.4.23-5) over (2.4.10-10+deb8u7) ...
Skipping unselected package apache2-dbg.
Skipping unselected package apache2-dev.
Skipping unselected package apache2-doc.
Skipping unselected package apache2-suexec-custom.
Skipping unselected package apache2-suexec-pristine.
Preparing to unpack apache2-utils_2.4.23-5_amd64.deb ...
Unpacking apache2-utils (2.4.23-5) over (2.4.10-10+deb8u7) ...
Setting up apache2-bin (2.4.23-5) ...
Setting up apache2-data (2.4.23-5) ...
Setting up apache2-utils (2.4.23-5) ...
Setting up apache2 (2.4.23-5) ...
Installing new version of config file /etc/apache2/apache2.conf ...
Installing new version of config file /etc/apache2/conf-available/security.conf ...
Installing new version of config file /etc/apache2/mods-available/proxy_html.load ...
Installing new version of config file /etc/apache2/mods-available/userdir.conf ...
Installing new version of config file /etc/apache2/sites-available/default-ssl.conf ...
Installing new version of config file /etc/cron.daily/apache2 ...
Installing new version of config file /etc/init.d/apache2 ...
Created symlink /etc/systemd/system/multi-user.target.wants/apache2.service → /lib/systemd/system/apache2.service.
Created symlink /etc/systemd/system/multi-user.target.wants/apache-htcacheclean.service → /lib/systemd/system/apache-htcacheclean.service.
Removing obsolete conffile /etc/bash_completion.d/apache2 ...
Processing triggers for systemd (231-4) ...
Processing triggers for man-db (2.7.5-1) ...
$ systemctl status apache-htcacheclean.service 
● apache-htcacheclean.service - Disk Cache Cleaning Daemon for Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache-htcacheclean.service; enabled; vendor preset: enabled)
   Active: active (running) since mer. 2016-09-21 05:21:34 EDT; 7s ago
 Main PID: 13453 (htcacheclean)
   CGroup: /system.slice/apache-htcacheclean.service
           └─13453 /usr/bin/htcacheclean -d 120 -p /var/cache/apache2/mod_cache_disk -l 300M -n

I also test a fresh install and apache-htcacheclean ends up disabled and not
running as well.

I think this meets all the requirements to be merged.

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer

Support Debian LTS: http://www.freexian.com/services/debian-lts.html
Learn to master Debian: http://debian-handbook.info/get/
[0001-Make-it-obvious-that-the-init-script-reads-a-differe.patch (text/x-diff, attachment)]
[0002-Add-systemd-unit-files.-Closes-798430.patch (text/x-diff, attachment)]
[0003-a2enmod-implement-systemd-support.patch (text/x-diff, attachment)]
[0004-setup-instance-better-systemd-support.patch (text/x-diff, attachment)]
[0005-Drop-lib-systemd-system-apache2.service.d-forking.co.patch (text/x-diff, attachment)]
[0006-Update-apache-htcacheclean.init-to-have-sensible-Def.patch (text/x-diff, attachment)]

Added tag(s) patch. Request was from Raphael Hertzog <hertzog@debian.org> to 798430-submit@bugs.debian.org. (Wed, 21 Sep 2016 09:30:04 GMT) (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org, Debian Apache Maintainers <debian-apache@lists.debian.org>:
Bug#798430; Package apache2. (Wed, 21 Sep 2016 10:12:20 GMT) (full text, mbox, link).


Acknowledgement sent to "Mathieu Parent (Debian)" <sathieu@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Apache Maintainers <debian-apache@lists.debian.org>. (Wed, 21 Sep 2016 10:12:20 GMT) (full text, mbox, link).


Message #47 received at 798430@bugs.debian.org (full text, mbox, reply):

From: "Mathieu Parent (Debian)" <sathieu@debian.org>
To: Raphael Hertzog <hertzog@debian.org>
Cc: Stefan Fritsch <sf@sfritsch.de>, Timo Aaltonen <tjaalton@debian.org>, 798430@bugs.debian.org
Subject: Re: Bug#798430: apache2: please add systemd service file
Date: Wed, 21 Sep 2016 12:11:41 +0200
hello Raphaël,


2016-09-21 11:28 GMT+02:00 Raphael Hertzog <hertzog@debian.org>:
> Control: tags -1 + patch
>
> Hi Stehan,
>
> On Mon, 19 Sep 2016, Raphael Hertzog wrote:
>> I'm going to work on this as we really want apache2 in stretch to have a
>> unit file so that we can benefit from all the systemd features for
>> Apache too.
>
> Please find attached the patches to apply on your git repository. I tested
> the resulting packages and it seems to work fine for me:

Yeepee ! Thanks for your work.

can you improve it a bit to use Type=notify.
This is how it is in Fedora:
http://pkgs.fedoraproject.org/cgit/rpms/httpd.git/tree/httpd.service

(and don't forget
http://pkgs.fedoraproject.org/cgit/rpms/httpd.git/tree/httpd-2.4.17-socket-activation.patch,
http://pkgs.fedoraproject.org/cgit/rpms/httpd.git/tree/httpd.socket, and
http://pkgs.fedoraproject.org/cgit/rpms/httpd.git/tree/10-listen443.conf)

If it's too hard, leave the current patch as is.

Cheers,

-- 
Mathieu Parent



Information forwarded to debian-bugs-dist@lists.debian.org, Debian Apache Maintainers <debian-apache@lists.debian.org>:
Bug#798430; Package apache2. (Wed, 21 Sep 2016 18:54:03 GMT) (full text, mbox, link).


Acknowledgement sent to Raphael Hertzog <hertzog@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Apache Maintainers <debian-apache@lists.debian.org>. (Wed, 21 Sep 2016 18:54:03 GMT) (full text, mbox, link).


Message #52 received at 798430@bugs.debian.org (full text, mbox, reply):

From: Raphael Hertzog <hertzog@debian.org>
To: "Mathieu Parent (Debian)" <sathieu@debian.org>
Cc: Stefan Fritsch <sf@sfritsch.de>, Timo Aaltonen <tjaalton@debian.org>, 798430@bugs.debian.org
Subject: Re: Bug#798430: apache2: please add systemd service file
Date: Wed, 21 Sep 2016 20:51:32 +0200
Hi,

On Wed, 21 Sep 2016, Mathieu Parent (Debian) wrote:
> can you improve it a bit to use Type=notify.

I saw they backported mod_systemd to Apache 2.4 but I don't know
if we should do the same or just wait until we have Apache 2.5.

I opted to not do it in this patchset but the Apache maintainers can
certainly include it if they think it's a good idea.

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer

Support Debian LTS: http://www.freexian.com/services/debian-lts.html
Learn to master Debian: http://debian-handbook.info/get/



Information forwarded to debian-bugs-dist@lists.debian.org, Debian Apache Maintainers <debian-apache@lists.debian.org>:
Bug#798430; Package apache2. (Wed, 21 Sep 2016 19:21:03 GMT) (full text, mbox, link).


Acknowledgement sent to Stefan Fritsch <sf@sfritsch.de>:
Extra info received and forwarded to list. Copy sent to Debian Apache Maintainers <debian-apache@lists.debian.org>. (Wed, 21 Sep 2016 19:21:03 GMT) (full text, mbox, link).


Message #57 received at 798430@bugs.debian.org (full text, mbox, reply):

From: Stefan Fritsch <sf@sfritsch.de>
To: Raphael Hertzog <hertzog@debian.org>
Cc: 798430@bugs.debian.org
Subject: Re: Bug#798430: apache2: please add systemd service file
Date: Wed, 21 Sep 2016 21:16:32 +0200
Thanks for the patch. I will take a look next week-end.

Cheers,
Stefan




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Apache Maintainers <debian-apache@lists.debian.org>:
Bug#798430; Package apache2. (Tue, 27 Sep 2016 08:00:03 GMT) (full text, mbox, link).


Acknowledgement sent to Raphael Hertzog <hertzog@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Apache Maintainers <debian-apache@lists.debian.org>. (Tue, 27 Sep 2016 08:00:03 GMT) (full text, mbox, link).


Message #62 received at 798430@bugs.debian.org (full text, mbox, reply):

From: Raphael Hertzog <hertzog@debian.org>
To: Stefan Fritsch <sf@sfritsch.de>
Cc: 798430@bugs.debian.org
Subject: Re: Bug#798430: apache2: please add systemd service file
Date: Tue, 27 Sep 2016 09:56:41 +0200
Hi,

On Wed, 21 Sep 2016, Stefan Fritsch wrote:
> Thanks for the patch. I will take a look next week-end.

Did you have the time to review my changes? If no, when do you expect to
be able to look at them?

I would gladly offer an NMU if you don't have the time (as I'm rather
confident in the work done and I can switch to urgency=low to have 10 days
of testing in unstable).

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer

Support Debian LTS: http://www.freexian.com/services/debian-lts.html
Learn to master Debian: http://debian-handbook.info/get/



Information forwarded to debian-bugs-dist@lists.debian.org, Debian Apache Maintainers <debian-apache@lists.debian.org>:
Bug#798430; Package apache2. (Tue, 27 Sep 2016 19:03:02 GMT) (full text, mbox, link).


Acknowledgement sent to Stefan Fritsch <sf@sfritsch.de>:
Extra info received and forwarded to list. Copy sent to Debian Apache Maintainers <debian-apache@lists.debian.org>. (Tue, 27 Sep 2016 19:03:02 GMT) (full text, mbox, link).


Message #67 received at 798430@bugs.debian.org (full text, mbox, reply):

From: Stefan Fritsch <sf@sfritsch.de>
To: Raphael Hertzog <hertzog@debian.org>
Cc: 798430@bugs.debian.org
Subject: Re: Bug#798430: apache2: please add systemd service file
Date: Tue, 27 Sep 2016 21:00:36 +0200
Hi Raphael,

On Tuesday, 27 September 2016 09:56:41 CEST Raphael Hertzog wrote:
> On Wed, 21 Sep 2016, Stefan Fritsch wrote:
> > Thanks for the patch. I will take a look next week-end.
> 
> Did you have the time to review my changes?

A bit, but not as much as I would have liked. And I didn't have time to do any 
testing. But what I have seen looked good.

> If no, when do you expect to
> be able to look at them?
> 
> I would gladly offer an NMU if you don't have the time (as I'm rather
> confident in the work done and I can switch to urgency=low to have 10 days
> of testing in unstable).

If you think that you will have some time to also deal with any severe 
regressions that may pop up, I am ok with an NMU. I fear I will be very busy 
in the next 2 weeks, and it would certainly be nice to get more testing for 
this diff sooner than that.

Cheers,
Stefan




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Apache Maintainers <debian-apache@lists.debian.org>:
Bug#798430; Package apache2. (Thu, 29 Sep 2016 10:42:05 GMT) (full text, mbox, link).


Acknowledgement sent to Raphael Hertzog <hertzog@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Apache Maintainers <debian-apache@lists.debian.org>. (Thu, 29 Sep 2016 10:42:05 GMT) (full text, mbox, link).


Message #72 received at 798430@bugs.debian.org (full text, mbox, reply):

From: Raphael Hertzog <hertzog@debian.org>
To: Stefan Fritsch <sf@sfritsch.de>
Cc: 798430@bugs.debian.org
Subject: Re: Bug#798430: apache2: please add systemd service file
Date: Thu, 29 Sep 2016 12:39:12 +0200
Hi Stefan,

On Tue, 27 Sep 2016, Stefan Fritsch wrote:
> A bit, but not as much as I would have liked. And I didn't have time to do any 
> testing. But what I have seen looked good.
[..]
> If you think that you will have some time to also deal with any severe 
> regressions that may pop up, I am ok with an NMU. I fear I will be very busy 
> in the next 2 weeks, and it would certainly be nice to get more testing for 
> this diff sooner than that.

Ok. I just pushed my changes with two supplementary changes, one to drop a
duplicate "update-rc.d remove" call in postrm and one to add some lintian
overrides.

I have just uploaded a new version with urgency=low. I tagged it as a team
upload since it's committed in git and you gave me prior approval.

I'm not following apache2 bug traffic, but shall any issues pop up in the
next days, feel free to forward it to me or to ping me on IRC (buxy).

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer

Support Debian LTS: http://www.freexian.com/services/debian-lts.html
Learn to master Debian: http://debian-handbook.info/get/



Reply sent to Raphaël Hertzog <hertzog@debian.org>:
You have taken responsibility. (Thu, 29 Sep 2016 11:27:05 GMT) (full text, mbox, link).


Notification sent to Arturo Borrero Gonzalez <aborrero@cica.es>:
Bug acknowledged by developer. (Thu, 29 Sep 2016 11:27:05 GMT) (full text, mbox, link).


Message #77 received at 798430-close@bugs.debian.org (full text, mbox, reply):

From: Raphaël Hertzog <hertzog@debian.org>
To: 798430-close@bugs.debian.org
Subject: Bug#798430: fixed in apache2 2.4.23-5
Date: Thu, 29 Sep 2016 11:24:42 +0000
Source: apache2
Source-Version: 2.4.23-5

We believe that the bug you reported is fixed in the latest version of
apache2, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 798430@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Raphaël Hertzog <hertzog@debian.org> (supplier of updated apache2 package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Thu, 29 Sep 2016 12:03:31 +0200
Source: apache2
Binary: apache2 apache2-data apache2-bin apache2-utils apache2-suexec-pristine apache2-suexec-custom apache2-doc apache2-dev apache2-dbg
Architecture: source
Version: 2.4.23-5
Distribution: unstable
Urgency: low
Maintainer: Debian Apache Maintainers <debian-apache@lists.debian.org>
Changed-By: Raphaël Hertzog <hertzog@debian.org>
Description:
 apache2    - Apache HTTP Server
 apache2-bin - Apache HTTP Server (modules and other binary files)
 apache2-data - Apache HTTP Server (common files)
 apache2-dbg - Apache debugging symbols
 apache2-dev - Apache HTTP Server (development headers)
 apache2-doc - Apache HTTP Server (on-site documentation)
 apache2-suexec-custom - Apache HTTP Server configurable suexec program for mod_suexec
 apache2-suexec-pristine - Apache HTTP Server standard suexec program for mod_suexec
 apache2-utils - Apache HTTP Server (utility programs for web servers)
Closes: 798430
Changes:
 apache2 (2.4.23-5) unstable; urgency=low
 .
   * Team upload.
 .
   [ Stefan Fritsch ]
   * Tweak creation of .tar.gz embedded in preinst to get reproducible
     build.
 .
   [ Raphaël Hertzog ]
   * Add systemd unit files. Closes: #798430
   * Improve a2enmod to enable apache-htcacheclean with systemctl and let
     it enable 'apache-htcacheclean@instance.service' for multi-instance
     support.
   * Improve setup-instance to rely on the systemd apache2@instance.service for
     multi-instance support.
   * Drop /lib/systemd/system/apache2.service.d/forking.conf now that we have
     proper native systemd support.
   * Modify handling of /etc/init.d/apache-htcacheclean to have a usual
     Default-Start value but instead we disable it manually in the postinst.
     That way "systemctl enable apache-htcacheclean" works.
   * Add some lintian overrides for non-problems (two update-rc.d calls in
     postinst, and a .js file with a very long line).
Checksums-Sha1:
 804932ea749788c4648e625a883a5b20b13d7298 2414 apache2_2.4.23-5.dsc
 46b289b6df0ddce43c4c74c1523887aafa823e8c 353676 apache2_2.4.23-5.debian.tar.xz
Checksums-Sha256:
 640a5ffb8429890a5c20fa67af8c135e10a624634e0f3cf64ea636bd906cf142 2414 apache2_2.4.23-5.dsc
 c2715174a1c1adffbb4e3a4acf2ed046e25838fde41c877e525b708833db45fa 353676 apache2_2.4.23-5.debian.tar.xz
Files:
 b782369456ddb19959d0b089dddb46fd 2414 httpd optional apache2_2.4.23-5.dsc
 78b111c95d802766f3da8015ebe59763 353676 httpd optional apache2_2.4.23-5.debian.tar.xz

-----BEGIN PGP SIGNATURE-----
Comment: Signed by Raphael Hertzog

iQEcBAEBCgAGBQJX7O7YAAoJEAOIHavrwpq5ND4H/2Dr/15Z4SZ12RR08i7/ttcP
Tm0F+LajnYz6E+BYxxkYIoxE3ugPBJeO0Z+5XIC6qTcRQDkWZPi61xNIqVPvpmd0
z7iCMoiO/pdsOaRCKirHbr8ldF+3op+2h8ksm20Nc6YzsfyW9Hq/XmcQ5I2OJc9T
WCUQya9aZ2svQZQrpBOLJZWZI86VbIFneUCEnoLwPvMhOlc/qdMipINy1ciLFPhE
3eAf/z8aDGXzGl0e+CIiFMk1pqZhCocyOsTe85GCa+oobAfoffr/7ikP2i+J7HC5
hqwDdZSZx04PObEEQnOZJOiO4IfmNRlYbB9uouaOaO1JoWM6nvSJJqsWZZxAj0k=
=CloC
-----END PGP SIGNATURE-----




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Mon, 05 Dec 2016 08:41:11 GMT) (full text, mbox, link).


Bug unarchived. Request was from Don Armstrong <don@debian.org> to control@bugs.debian.org. (Wed, 07 Dec 2016 01:42:50 GMT) (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org, Debian Apache Maintainers <debian-apache@lists.debian.org>:
Bug#798430; Package apache2. (Mon, 24 Apr 2017 22:33:05 GMT) (full text, mbox, link).


Acknowledgement sent to alcione linhares domingues <alcioneadelinalinhares@hotmail.com>:
Extra info received and forwarded to list. Copy sent to Debian Apache Maintainers <debian-apache@lists.debian.org>. (Mon, 24 Apr 2017 22:33:06 GMT) (full text, mbox, link).


Message #86 received at 798430@bugs.debian.org (full text, mbox, reply):

From: alcione linhares domingues <alcioneadelinalinhares@hotmail.com>
To: "798430@bugs.debian.org" <798430@bugs.debian.org>
Subject: M.oi.com.br
Date: Mon, 24 Apr 2017 22:29:27 +0000
[Message part 1 (text/plain, inline)]

Enviado pelo meu Windows Phone
[Message part 2 (text/html, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Apache Maintainers <debian-apache@lists.debian.org>:
Bug#798430; Package apache2. (Tue, 25 Apr 2017 12:51:02 GMT) (full text, mbox, link).


Acknowledgement sent to alcione linhares domingues <alcioneadelinalinhares@hotmail.com>:
Extra info received and forwarded to list. Copy sent to Debian Apache Maintainers <debian-apache@lists.debian.org>. (Tue, 25 Apr 2017 12:51:02 GMT) (full text, mbox, link).


Message #91 received at 798430@bugs.debian.org (full text, mbox, reply):

From: alcione linhares domingues <alcioneadelinalinhares@hotmail.com>
To: "798430@bugs.debian.org" <798430@bugs.debian.org>
Subject: Bug report
Date: Tue, 25 Apr 2017 12:48:35 +0000
[Message part 1 (text/plain, inline)]
I'm tried to buy a cellphone to me, but when I look the setting of device from nothing he close. Please, this app is very good, fix this problem for us.
[Message part 2 (text/html, inline)]
[wp_ss_20170425_0001.jpg (image/jpeg, attachment)]

Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Mon, 04 Sep 2017 07:27:37 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed Jan 10 01:43:44 2018; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.