Bug#857607: apache2.logrotate: don't invoke /etc/init.d/apache2 in postrotate script

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Bug#857607: apache2.logrotate: don't invoke /etc/init.d/apache2 in postrotate script

Sergio Gelato
Package: apache2
Version: 2.4.25-3

Now that apache2 includes a native systemd unit, it may be prudent to stop assuming that /etc/init.d/apache2 exists. (It's still distributed as part of the package, but since it's a configuration file system administrators are free to delete it.)

The postrotate script in /etc/logrotate.d/apache2 invokes /etc/init.d/apache2 directly; according to section 9.3.3 of the Debian policy it should be using invoke-rc.d instead.
Reply | Threaded
Open this post in threaded view
|

Bug#857607: apache2.logrotate: don't invoke /etc/init.d/apache2 in postrotate script

Stefan Fritsch
On Monday, 13 March 2017 08:07:01 CET Sergio Gelato wrote:
> Now that apache2 includes a native systemd unit, it may be prudent to stop
> assuming that /etc/init.d/apache2 exists. (It's still distributed as part
> of the package, but since it's a configuration file system administrators
> are free to delete it.)

True.

>
> The postrotate script in /etc/logrotate.d/apache2 invokes
> /etc/init.d/apache2 directly; according to section 9.3.3 of the Debian
> policy it should be using invoke-rc.d instead.

That section only talks about the package scripts (postinst, etc.). I don't
think it is applicable for logrotate scripts.

The reason I didn't use invoke-rc.d is that it obeys runlevel constraints,
which is not wanted in the logrotate script. But it seems invoke-rc.d has this
limitation only for "start", not for "status" and "reload". So switching to
invoke-rc.d should be fine.

Reply | Threaded
Open this post in threaded view
|

Bug#857607: apache2.logrotate: don't invoke /etc/init.d/apache2 in postrotate script

Sergio Gelato
* Stefan Fritsch [2017-03-13 22:14:23 +0100]:

> On Monday, 13 March 2017 08:07:01 CET Sergio Gelato wrote:
> > The postrotate script in /etc/logrotate.d/apache2 invokes
> > /etc/init.d/apache2 directly; according to section 9.3.3 of the Debian
> > policy it should be using invoke-rc.d instead.
>
> That section only talks about the package scripts (postinst, etc.). I don't
> think it is applicable for logrotate scripts.
>
> The reason I didn't use invoke-rc.d is that it obeys runlevel constraints,
> which is not wanted in the logrotate script. But it seems invoke-rc.d has this
> limitation only for "start", not for "status" and "reload". So switching to
> invoke-rc.d should be fine.

What about the policy-rc.d mechanism? Is it wanted or unwanted in this case?

An alternative, if invoke-rc.d really is unsuitable, would be to use service.

Reply | Threaded
Open this post in threaded view
|

Bug#857607: marked as done (apache2.logrotate: don't invoke /etc/init.d/apache2 in postrotate script)

Debian Bug Tracking System
In reply to this post by Sergio Gelato
Your message dated Tue, 08 Aug 2017 23:49:21 +0000
with message-id <[hidden email]>
and subject line Bug#857607: fixed in apache2 2.4.27-4
has caused the Debian Bug report #857607,
regarding apache2.logrotate: don't invoke /etc/init.d/apache2 in postrotate script
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [hidden email]
immediately.)


--
857607: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=857607
Debian Bug Tracking System
Contact [hidden email] with problems

Package: apache2
Version: 2.4.25-3

Now that apache2 includes a native systemd unit, it may be prudent to stop assuming that /etc/init.d/apache2 exists. (It's still distributed as part of the package, but since it's a configuration file system administrators are free to delete it.)

The postrotate script in /etc/logrotate.d/apache2 invokes /etc/init.d/apache2 directly; according to section 9.3.3 of the Debian policy it should be using invoke-rc.d instead.
Source: apache2
Source-Version: 2.4.27-4

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 [hidden email],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Stefan Fritsch <[hidden email]> (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 [hidden email])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Tue, 08 Aug 2017 21:59:37 +0200
Source: apache2
Binary: apache2 apache2-data apache2-bin apache2-utils apache2-suexec-pristine apache2-suexec-custom apache2-doc apache2-dev apache2-ssl-dev apache2-dbg
Architecture: source amd64 all
Version: 2.4.27-4
Distribution: experimental
Urgency: medium
Maintainer: Debian Apache Maintainers <[hidden email]>
Changed-By: Stefan Fritsch <[hidden email]>
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-ssl-dev - Apache HTTP Server (mod_ssl development headers)
 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: 857607
Changes:
 apache2 (2.4.27-4) experimental; urgency=medium
 .
   * Use 'invoke-rc.d' instead of init script in logrotate script.
     Closes: #857607
   * Make the apache-htcacheclean init script actually look into
     /etc/default/apache-htcacheclean for its config. LP: #1691495
   * mime.conf: Guard AddOutputFilter INCLUDES with proper <IfModule>.
     LP: #1675184
   * Use 'service' instead of init script in monit example config.
   * Bump Standards-Version to 4.0.1. Other changes:
     - change package priorities from extra to optional
   * Use libprotocol-http2-perl in autopkgtest.
   * Update test suite to svn r1804214.
   * Various tweaks to the test suite autopkgtest to avoid having to skip
     any test.
   * Also remove -DBUILD_DATETIME and -fdebug-prefix-map from config_vars.mk
     to avoid them being used by apxs.
   * deflate.conf: Remove mention of MSIE6
Checksums-Sha1:
 57a34c08ddf5912dcb11e3171ddf9f77293810b4 3037 apache2_2.4.27-4.dsc
 b0cd906b92c6f6617af1f8b3113febb9ac34ca80 701960 apache2_2.4.27-4.debian.tar.xz
 47ef16c412f4e81074313408cc17deb5dcff42e5 1211162 apache2-bin_2.4.27-4_amd64.deb
 9f29832181993ab726301b2bb16c0509aafb5ca8 162114 apache2-data_2.4.27-4_all.deb
 58ec42a40f6e816d0bd889abecfe8e485eefef88 3985898 apache2-dbg_2.4.27-4_amd64.deb
 81ace6248228d85a65b479516cd3f190924f9e98 317838 apache2-dev_2.4.27-4_amd64.deb
 fe7725004bf13d579cf65d2509dcafa20e13b860 3820990 apache2-doc_2.4.27-4_all.deb
 943d01bdd03823cb63c9a0a52f76fff6081b9cbe 2248 apache2-ssl-dev_2.4.27-4_amd64.deb
 8161e3b2c429d95f7ee2dbcaf3800ba487bdac74 159122 apache2-suexec-custom_2.4.27-4_amd64.deb
 8cb7970a3af6062afbeb00881118152d3556db0b 157572 apache2-suexec-pristine_2.4.27-4_amd64.deb
 dee847d45802f7c9759cb179597a7f6ee09b1179 222160 apache2-utils_2.4.27-4_amd64.deb
 7e60eb674c1abafa3115e98e32362d078adaa07e 9517 apache2_2.4.27-4_amd64.buildinfo
 04a414bcdfc3b23e31c078264d4d1267fe7edff8 239466 apache2_2.4.27-4_amd64.deb
Checksums-Sha256:
 13397590bbfd23653722d9674b9b65880ba5865cc600417c187fb74a7a65894a 3037 apache2_2.4.27-4.dsc
 96ea22ef150bff0ccd2e8e84f278113626b6d66bea4ffbe34d7a6313305755ae 701960 apache2_2.4.27-4.debian.tar.xz
 3a3763e42227aea54b76021da39113fdd0b83b50f4b9fa37aa3942fcc826d640 1211162 apache2-bin_2.4.27-4_amd64.deb
 e7ebe44e03eb339f3568b73307c126e1b7322ffe3107d88e3db7bc3534547d86 162114 apache2-data_2.4.27-4_all.deb
 d511db7da8e5c2bcc53cc908baa01e67432fb2deb02a54472020f1b7d87376f3 3985898 apache2-dbg_2.4.27-4_amd64.deb
 698429cfa6e9fd7a61a4fd243de37ca4bf2ee6d30b130792f69bb24a5c17a805 317838 apache2-dev_2.4.27-4_amd64.deb
 2efe7b4ef81b8ee1d78c7e41471b7d1669d317b692d6f1a0c5a7f1b1bcc46b45 3820990 apache2-doc_2.4.27-4_all.deb
 bfd3f8d794bcd288ca55aa224cbc0aa8eea43881b567799106d6824a26d73ff4 2248 apache2-ssl-dev_2.4.27-4_amd64.deb
 878d0326f3d88e4fde93be434eab312f0fc3a3e0de4dd25d76700899bc219de1 159122 apache2-suexec-custom_2.4.27-4_amd64.deb
 435a49c277cebfb7f1bfafee722602513ec58d9b59f56569500231c4c6134727 157572 apache2-suexec-pristine_2.4.27-4_amd64.deb
 57189edf4b94bac707d7201c27b987f37e89dcdf329c12fb3f574dd44a332c4f 222160 apache2-utils_2.4.27-4_amd64.deb
 6751a49aae43a110b9fb2b40d32e845d280dd9a4611c30522eafe655426fc40c 9517 apache2_2.4.27-4_amd64.buildinfo
 81cbf5609786af57db03a08bf6823f5c743f959ca8fb763db97354471e7a3774 239466 apache2_2.4.27-4_amd64.deb
Files:
 761b7de5e2dcfe133df732f3082bca18 3037 httpd optional apache2_2.4.27-4.dsc
 4c854d38d3b7a9c4f99f77b683d9cbff 701960 httpd optional apache2_2.4.27-4.debian.tar.xz
 1082f4bfdba203dc6eefc77fdd6bbaa6 1211162 httpd optional apache2-bin_2.4.27-4_amd64.deb
 c3a7f8e595dc4707da7f97726da850c2 162114 httpd optional apache2-data_2.4.27-4_all.deb
 4c985a07d446a7e78202ad284b760969 3985898 debug optional apache2-dbg_2.4.27-4_amd64.deb
 3c9e67fcbc51d0f414be3aaa287a7c1a 317838 httpd optional apache2-dev_2.4.27-4_amd64.deb
 92eccd73f96c2013f6a1d69924226cd1 3820990 doc optional apache2-doc_2.4.27-4_all.deb
 499842952eaddff27bbd6c84bef7b428 2248 httpd optional apache2-ssl-dev_2.4.27-4_amd64.deb
 bf1b712e1d8a8d00cb622ebfb7583100 159122 httpd optional apache2-suexec-custom_2.4.27-4_amd64.deb
 28c7bd4bcc33869f20b5f6f9f2fddecb 157572 httpd optional apache2-suexec-pristine_2.4.27-4_amd64.deb
 0c5852e6d2bc590392fcb879edc59085 222160 httpd optional apache2-utils_2.4.27-4_amd64.deb
 225935b2926a400011268675b4f70f3b 9517 httpd optional apache2_2.4.27-4_amd64.buildinfo
 579c1ffba20c6773e297ec8ce8a0858f 239466 httpd optional apache2_2.4.27-4_amd64.deb

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEOpiNza8JqByyYYsxxodfNUHO/eAFAlmKJPQACgkQxodfNUHO
/eAsSw//T3hs6QP9F8AVXtrtFx814LNPNep+04HdFB6XErm9BLRV2R+HBEx6eNJd
q5eoMZ3/+UYNj9YH7ZRrhucPkhuyo+BOMLF62EAlKcIq+BACIhBQtqLE6jTdi6Xo
/JXXDnVDX2CI+nDV2N5gQw8c+fgxqgzAfr/eze3CEGljFZh5qDnCs77tjP+W6hHf
Se80zztWXwwn0uhVMCbnLxyeB3tN07rLOD5L4jsWrWDnoly8TDqTidZs8dwDDRFO
edEbe7W0tj6NAOdgWYhs6k0wW4C8p5vFVVZiselglAHNcNgs0tW0DFW0ZTyigmNQ
RQgC/np2mmjZfcpNQr9nzrUp/RCa9t9qY8SwKjpoxB6eOU6l8ZWw3oHl8vKWR35K
13FJrsHeJjLMw1dDmOoNKAp11VgLoSosGK+QjjH+xGIlb1N44Bv5BhVYwcIsjJdM
oiK7GywSvw6wxcwsRupDisuxauHY8yRe2IvzT/3/zY5jih8T0I79B7lmzaSazKh0
o5SJgnAM8cLapMliVaaSAiEgnoab4/NMivTkLHarK63GvYdOHL9j9vMyZpx0Lmgc
ZbH6wQwrai4gGFLnH/tBW1xXEisv+gDqpmbRejchH1+MGtTIv7ymVF4n+g3vkGdr
x7J/Subct97evcajuGtlm8ND1B3n+uKgAFUbm8p5QLqNJfS0D9s=
=AaSc
-----END PGP SIGNATURE-----