Debian Bug report logs - #985314
asterisk spams console output to syslog due to systemd misconfiguration

version graph

Package: src:asterisk; Maintainer for src:asterisk is Debian VoIP Team <pkg-voip-maintainers@lists.alioth.debian.org>;

Reported by: Utkarsh Gupta <utkarsh@debian.org>

Date: Mon, 15 Mar 2021 20:45:02 UTC

Severity: normal

Tags: patch

Found in versions asterisk/1:16.16.1~dfsg+~2.10-1, asterisk/1:16.16.1~dfsg-1

Fixed in versions asterisk/1:16.16.1~dfsg-4, asterisk/1:16.16.1~dfsg+~2.10-2

Done: Jonas Smedegaard <dr@jones.dk>

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, 1909816@bugs.launchpad.net, Debian VoIP Team <pkg-voip-maintainers@lists.alioth.debian.org>:
Bug#985314; Package src:asterisk. (Mon, 15 Mar 2021 20:45:03 GMT) (full text, mbox, link).


Acknowledgement sent to Utkarsh Gupta <utkarsh@debian.org>:
New Bug report received and forwarded. Copy sent to 1909816@bugs.launchpad.net, Debian VoIP Team <pkg-voip-maintainers@lists.alioth.debian.org>. (Mon, 15 Mar 2021 20:45:03 GMT) (full text, mbox, link).


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

From: Utkarsh Gupta <utkarsh@debian.org>
To: berni@debian.org, submit@bugs.debian.org
Subject: asterisk spams console output to syslog due to systemd misconfiguration
Date: Tue, 16 Mar 2021 02:13:37 +0530
[Message part 1 (text/plain, inline)]
Source: asterisk
Version: 1:16.16.1~dfsg-1
Severity: normal
Tags: patch
X-Debbugs-Cc: 1909816@bugs.launchpad.net

Hi Bernhard,

Thanks for taking care of asterisk. This bug report is just a mere
forward of what was originally reported in Ubuntu; cf:
https://bugs.launchpad.net/ubuntu/+source/asterisk/+bug/1909816.

So I'll rather not copy-paste its content here, instead just copy my findings:
The service file seems to be coming from
"contrib/systemd/asterisk.service" file, which is a part of the
upstream source. Interestingly, there's also a Debian patch named
"debian/patches/systemd.patch" which adds a new file,
"contrib/asterisk.service", which is where the default service file is
created from.

Therefore, would you be interested to fix this in Debian? The proposed
patch is hereby attached. Let me know what you think?

Thanks again for your work!


- u
[asterisk+lp1909816.patch (text/x-patch, attachment)]

Reply sent to Bernhard Schmidt <berni@debian.org>:
You have taken responsibility. (Mon, 01 Nov 2021 22:51:05 GMT) (full text, mbox, link).


Notification sent to Utkarsh Gupta <utkarsh@debian.org>:
Bug acknowledged by developer. (Mon, 01 Nov 2021 22:51:05 GMT) (full text, mbox, link).


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

From: Debian FTP Masters <ftpmaster@ftp-master.debian.org>
To: 985314-close@bugs.debian.org
Subject: Bug#985314: fixed in asterisk 1:16.16.1~dfsg-4
Date: Mon, 01 Nov 2021 22:50:07 +0000
Source: asterisk
Source-Version: 1:16.16.1~dfsg-4
Done: Bernhard Schmidt <berni@debian.org>

We believe that the bug you reported is fixed in the latest version of
asterisk, 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 985314@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Bernhard Schmidt <berni@debian.org> (supplier of updated asterisk 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: Mon, 01 Nov 2021 23:16:15 +0100
Source: asterisk
Architecture: source
Version: 1:16.16.1~dfsg-4
Distribution: unstable
Urgency: medium
Maintainer: Debian VoIP Team <pkg-voip-maintainers@lists.alioth.debian.org>
Changed-By: Bernhard Schmidt <berni@debian.org>
Closes: 971090 985314
Changes:
 asterisk (1:16.16.1~dfsg-4) unstable; urgency=medium
 .
   [ Utkarsh Gupta ]
   * Set default systemd config to avoid console output to syslog.
     (Closes: #985314, #971090)
Checksums-Sha1:
 a3829ccf8081ac4b2af6c12e4775a80962bfb00d 4227 asterisk_16.16.1~dfsg-4.dsc
 4132167d4aa68adaa6cf3b4705f294123b8d7dcd 5955128 asterisk_16.16.1~dfsg-4.debian.tar.xz
 3848a941a8a3d8fa947be34e76757dae6efc20ff 27237 asterisk_16.16.1~dfsg-4_amd64.buildinfo
Checksums-Sha256:
 7209ee633d54acefa28aefebddc42c5d29cd0b1afd46bef47010744fe3a62ab8 4227 asterisk_16.16.1~dfsg-4.dsc
 7f87f6de8bcc199b5b3c7f1247cdc7584b5596920829d7c8139786e4ab79e57c 5955128 asterisk_16.16.1~dfsg-4.debian.tar.xz
 1594fb705ebeda0878642383ce4b6d085fdbeb3e6cb652798130bf057804148f 27237 asterisk_16.16.1~dfsg-4_amd64.buildinfo
Files:
 748d64cc6bfa4e7f55eeb36b819d0f39 4227 comm optional asterisk_16.16.1~dfsg-4.dsc
 31fa3dc51db66482d4f8b8b351f00fdc 5955128 comm optional asterisk_16.16.1~dfsg-4.debian.tar.xz
 4cf8e47177bd42a6521a7ea660614cc5 27237 comm optional asterisk_16.16.1~dfsg-4_amd64.buildinfo

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

iQJFBAEBCgAvFiEE1uAexRal3873GVbTd1B55bhQvJMFAmGAbHoRHGJlcm5pQGRl
Ymlhbi5vcmcACgkQd1B55bhQvJOJ1Q/+L4VZaUzis/rY/+xOHzAZpzWU9e2QDxk9
Uz62y0repRoC/ZDhRja4URqSE4RjaP9doJIz838CXija0Jzv/WnQGekpHgLrKZTf
f2tb5k3VvdjFC/TrMSJGBGKQJ+84DL4/f+nj9sxUKGrZImvLkjB3s6OGhudiiMa5
vrODIjroS9+PudNUnpb/IwgMt7KfIGOC+KGttj6TqhMj20TRy47AVc3J0uVtvPbr
PEeaJvLHC2Q6zSjtQ194p0rqFFM6s6JLiTn0rWJGI0ucZoYON06Hoh9G7U7WOsda
UCFcWSHn8uqnPB2qsj/WE3Yz7buctGfHRCKzCqWlcZ0EuIVnTnksCBYUtNsVN4Qv
vFWU/IP2SAfV/nHplpBd0lSdCgagftTNyfz9mC+sSnbrEXS+PnDUxh93bV1B5hoz
puocTYYXCNcPHbinHAMPJZ58IzBnLyv/0EGizVRqXS/hA+kf2U2HSfADr6V97yQr
bZynSMFsYtjmrkmjjclHkf2w6hfPZE4wIORAHLO22rk3GBK16WniGLe0UtgEZL1n
5N47GBRkXCjVaJOx7u6ulAoruSTpwoeQ5WplXQQGg20yIUObaXHlvXjPm6xTN8AA
F24WOOxFkaAThZeTmyqa41J0R9r2HjhAKUiGAU91Oq5lqvx602jAGiaewcmxhEmx
t6fbsbSI+NM=
=82l8
-----END PGP SIGNATURE-----




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Tue, 30 Nov 2021 07:25:07 GMT) (full text, mbox, link).


Bug unarchived. Request was from Sergio Durigan Junior <sergiodj@debian.org> to control@bugs.debian.org. (Wed, 19 Jan 2022 17:09:04 GMT) (full text, mbox, link).


Marked as found in versions asterisk/1:16.16.1~dfsg+~2.10-1 and reopened. Request was from Sergio Durigan Junior <sergiodj@debian.org> to control@bugs.debian.org. (Wed, 19 Jan 2022 17:09:05 GMT) (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org, Debian VoIP Team <pkg-voip-maintainers@lists.alioth.debian.org>:
Bug#985314; Package src:asterisk. (Wed, 19 Jan 2022 17:21:03 GMT) (full text, mbox, link).


Acknowledgement sent to Sergio Durigan Junior <sergiodj@sergiodj.net>:
Extra info received and forwarded to list. Copy sent to Debian VoIP Team <pkg-voip-maintainers@lists.alioth.debian.org>. (Wed, 19 Jan 2022 17:21:03 GMT) (full text, mbox, link).


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

From: Sergio Durigan Junior <sergiodj@sergiodj.net>
To: 985314@bugs.debian.org
Subject: Fwd: Re: Bug#985314: asterisk spams console output to syslog due to systemd misconfiguration
Date: Wed, 19 Jan 2022 12:16:22 -0500
[Message part 1 (text/plain, inline)]
The bug was archived, so the message I sent (below) bounced.  Forwarding
it.

-- 
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF  31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
https://sergiodj.net/

-------------------- Start of forwarded message --------------------
From: Sergio Durigan Junior <sergiodj@debian.org>
To: Utkarsh Gupta <utkarsh@debian.org>
Cc: berni@debian.org,  985314@bugs.debian.org
Subject: Re: Bug#985314: asterisk spams console output to syslog due to
 systemd misconfiguration
Date: Wed, 19 Jan 2022 11:49:02 -0500

[Message part 2 (text/plain, inline)]
On Monday, March 15 2021, Utkarsh Gupta wrote:

> Hi Bernhard,
>
> Thanks for taking care of asterisk. This bug report is just a mere
> forward of what was originally reported in Ubuntu; cf:
> https://bugs.launchpad.net/ubuntu/+source/asterisk/+bug/1909816.
[...]

"Editing patches by hand considered evil" :-).

This upload introduced a problem: the asterisk.service file doesn't
contain the [Install] section anymore, which makes it be treated as a
static unit by systemd.  This means that the service cannot be
enabled/disabled, so when a reboot happens the service doesn't
automatically start.

This has been reported in
https://bugs.launchpad.net/ubuntu/+source/asterisk/+bug/1958259, btw.

The problem happened because the file d/p/systemd.patch was likely
edited by hand, but the diff header was not updated to reflect the new
lines that have been added.  Because of this, 'patch' silently drops the
last 6 lines of the diff when applying it.

The following patch should fix the problem.

Thanks,

-- 
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF  31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
https://sergiodj.net/

diff --git a/debian/patches/systemd.patch b/debian/patches/systemd.patch
index de803e43..34da8fed 100644
--- a/debian/patches/systemd.patch
+++ b/debian/patches/systemd.patch
@@ -81,7 +81,7 @@ Last-Update: 2016-04-02
 +fi
 --- /dev/null
 +++ b/contrib/asterisk.service
-@@ -0,0 +1,49 @@
+@@ -0,0 +1,55 @@
 +[Unit]
 +Description=Asterisk PBX
 +Documentation=man:asterisk(8)
[signature.asc (application/pgp-signature, inline)]
[Message part 4 (text/plain, inline)]
-------------------- End of forwarded message --------------------

Added tag(s) pending. Request was from Jonas Smedegaard <dr@jones.dk> to control@bugs.debian.org. (Wed, 19 Jan 2022 17:42:02 GMT) (full text, mbox, link).


Reply sent to Jonas Smedegaard <dr@jones.dk>:
You have taken responsibility. (Thu, 20 Jan 2022 14:39:08 GMT) (full text, mbox, link).


Notification sent to Utkarsh Gupta <utkarsh@debian.org>:
Bug acknowledged by developer. (Thu, 20 Jan 2022 14:39:08 GMT) (full text, mbox, link).


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

From: Debian FTP Masters <ftpmaster@ftp-master.debian.org>
To: 985314-close@bugs.debian.org
Subject: Bug#985314: fixed in asterisk 1:16.16.1~dfsg+~2.10-2
Date: Thu, 20 Jan 2022 14:34:21 +0000
Source: asterisk
Source-Version: 1:16.16.1~dfsg+~2.10-2
Done: Jonas Smedegaard <dr@jones.dk>

We believe that the bug you reported is fixed in the latest version of
asterisk, 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 985314@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Jonas Smedegaard <dr@jones.dk> (supplier of updated asterisk 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, 20 Jan 2022 10:33:17 +0100
Source: asterisk
Architecture: source
Version: 1:16.16.1~dfsg+~2.10-2
Distribution: unstable
Urgency: medium
Maintainer: Debian VoIP Team <pkg-voip-maintainers@lists.alioth.debian.org>
Changed-By: Jonas Smedegaard <dr@jones.dk>
Closes: 985314 1003925
Changes:
 asterisk (1:16.16.1~dfsg+~2.10-2) unstable; urgency=medium
 .
   * fix sysV init file to align with mariadb (not mysql);
     closes: bug#1003925, thanks to Roel van Meer
   * fix silently broken patch systemd;
     closes: bug#985314, thanks to Sergio Durigan Junior
   * unfuzz patches, with shortening quilt options
   * Trim trailing whitespace.
   * Use secure URI in Homepage field.
   * Update renamed lintian tag names in lintian overrides.
   * Drop transition for old debug package migration.
   * stop set CFLAGS=-fgnu89-inline,
     as GCC 5.x was supported upstream since late 2015
     (see also bug#777782)
   * explicitly disable BUILD_NATIVE,
     and stop set CFLAGS and LDFLAGS in configure
     (only in make menuselect)
   * tighten bug closures in changelog,
     for slightly better readability
     and to avoid confusing lintian-brush
   * stop export build flags: they are passed as arguments
   * let dh_auto_config resolve core configure options
   * revive upstream optimization flags
     unless DEB_BUILD_OPTIONS=noopt
   * support DEB_BUILD_OPTIONS=terse
   * fix install file CHANGES as upstream changelog,
     and more detailed ChangeLog only with asterisk-doc
   * use debhelper compatibility level 13 (not 10);
     stop install duplicates in package asterisk-doc
     now that its install path coincide with package asterisk;
     build-depend on debhelper-compat (not debhelper)
   * adapt install routines and helper scripts to use multiarch paths;
     add NEWS entry about this change
   * fix install phoneprov XML files
   * explicitly list a few images, contrib scripts and sample website
     as not-installed
   * fix install a manpage (not corresponding script)
     into manpage directory
   * install main header file only below /usr/include
     (i.e. drop transitional symlinking done in 2008)
   * install most possible manpages from upstream-installed locations,
     to ease detecting missed install files
   * update copyright info:
     + use SPDX shortname Apache-2.0
     + drop unused License section LGPL-2.1
     + fix Files section for codecs/gsm,
       covering both left-truncating wildcard
       and an explicit file overriding right-truncating wildcard,
       to list it _after_ right-truncating wildcard Files sections
   * fix have asterisk pre-depend on misc:Pre-Depends,
     needed by systemd calls in maintainer scripts
Checksums-Sha1:
 35545816fcef0babb52ff7c344fc2cf72067fc9e 4568 asterisk_16.16.1~dfsg+~2.10-2.dsc
 a082d08f6c8793245c08e0beeaa1c3685160444e 158768 asterisk_16.16.1~dfsg+~2.10-2.debian.tar.xz
 1891807f70b9cffbe54a14cf2ee677d272514462 27529 asterisk_16.16.1~dfsg+~2.10-2_amd64.buildinfo
Checksums-Sha256:
 6db9614a50b2550d2fb8daa1b7df1d9def091fe8c62924663cea15798375ab88 4568 asterisk_16.16.1~dfsg+~2.10-2.dsc
 ae54960c07cc51eeb81f817fbdd51c5b8c7838bc2296b858aa0b18d85fc733c9 158768 asterisk_16.16.1~dfsg+~2.10-2.debian.tar.xz
 ca15ab0986b2cf92aa05d87f2950ef3a9a695ef0a9955cd935bd9b81046da065 27529 asterisk_16.16.1~dfsg+~2.10-2_amd64.buildinfo
Files:
 be9b5469f4c434097deff696e2ee4e83 4568 comm optional asterisk_16.16.1~dfsg+~2.10-2.dsc
 e9445b08e6f2038b57b9b0c020864bdf 158768 comm optional asterisk_16.16.1~dfsg+~2.10-2.debian.tar.xz
 d7d38af4c0248bf68c814a8dd2b96048 27529 comm optional asterisk_16.16.1~dfsg+~2.10-2_amd64.buildinfo

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

iQIzBAEBCgAdFiEEn+Ppw2aRpp/1PMaELHwxRsGgASEFAmHpbhoACgkQLHwxRsGg
ASEjig/9HStGcGBSU17XfspPxp0wH4Ixz0ilDOkuRVMmxGEA5kyTaW5jTh9mHGK1
l8dNw3UoVHPvHby45p8Bb3wzBYK5gwo8Fo6b+L7mrDje2U0dLvZBUUTVsMaTM8Ug
Ny9kZSvkEGcu9BjebhIYs7uZEFLSl1WRl5ooAb34f2RbnaOz6Vpk+sQB2SaOcdHo
rGAXCaXnTGELFnnusSY6bkybPPviWcj1TsXHk/qAMb2gSwmFz4AkkC+UnCORd3bL
fATY7O7NeuBiIAl/in2m1WhhlAMxByxSJPy0XJLNeUU1FNxQSbV1OQrGRyyYOOhC
S+t2Ezg016/ENXIp/TwAeiWSeAgrX/FiQGcdP+bPuMm6nkHlZYzhCzewoK6GiyTX
imWf/Tg1Co35fDTFOBNGiwNtmgH90bFGzirmDc3o+ZQvQ4V7N4jGiqKEXsk2191Z
wLmvdJdUZ6W8b7/xIGSc2vPlyRhyc1pztZvNyS9NvpKdcn9zbS0PaKZ0pyAv2IvO
ZCgfpmwgBYEEXh6lQI7T5kB2QcBIamSZwFEK9+gQQxb/MO3l7RQN7Sj4H5UbUyeb
pALGeBckX68xwbqbQfBbMs+ORxYV4oKK9BLtxqUeFBrulRcllNO/jmMiAiK1mhQe
scfGMh2AhFk3faSr9io7ruRZ45LEfuHKc6X0nNKOTjA7xc0fNGc=
=RPv9
-----END PGP SIGNATURE-----




Information forwarded to debian-bugs-dist@lists.debian.org, Debian VoIP Team <pkg-voip-maintainers@lists.alioth.debian.org>:
Bug#985314; Package src:asterisk. (Thu, 20 Jan 2022 19:36:03 GMT) (full text, mbox, link).


Acknowledgement sent to Utkarsh Gupta <utkarsh@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian VoIP Team <pkg-voip-maintainers@lists.alioth.debian.org>. (Thu, 20 Jan 2022 19:36:03 GMT) (full text, mbox, link).


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

From: Utkarsh Gupta <utkarsh@debian.org>
To: Sergio Durigan Junior <sergiodj@debian.org>
Cc: berni@debian.org, 985314@bugs.debian.org
Subject: Re: Bug#985314: asterisk spams console output to syslog due to systemd misconfiguration
Date: Fri, 21 Jan 2022 01:02:35 +0530
Hi Sergio,

On Wed, Jan 19, 2022 at 10:26 PM Sergio Durigan Junior
<sergiodj@debian.org> wrote:
> "Editing patches by hand considered evil" :-).
>
> This upload introduced a problem: the asterisk.service file doesn't
> contain the [Install] section anymore, which makes it be treated as a
> static unit by systemd.  This means that the service cannot be
> enabled/disabled, so when a reboot happens the service doesn't
> automatically start.
>
> This has been reported in
> https://bugs.launchpad.net/ubuntu/+source/asterisk/+bug/1958259, btw.
>
> The problem happened because the file d/p/systemd.patch was likely
> edited by hand, but the diff header was not updated to reflect the new
> lines that have been added.  Because of this, 'patch' silently drops the
> last 6 lines of the diff when applying it.

I don't think this was a problem in the patch that I attached to the
bug but somehow it got introduced when some applied that and uploaded,
maybe? I could be very wrong but I am trying to understand where did
things go wrong.


- u



Information forwarded to debian-bugs-dist@lists.debian.org, Debian VoIP Team <pkg-voip-maintainers@lists.alioth.debian.org>:
Bug#985314; Package src:asterisk. (Thu, 20 Jan 2022 19:42:03 GMT) (full text, mbox, link).


Acknowledgement sent to Utkarsh Gupta <utkarsh@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian VoIP Team <pkg-voip-maintainers@lists.alioth.debian.org>. (Thu, 20 Jan 2022 19:42:03 GMT) (full text, mbox, link).


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

From: Utkarsh Gupta <utkarsh@debian.org>
To: Sergio Durigan Junior <sergiodj@debian.org>
Cc: berni@debian.org, 985314@bugs.debian.org
Subject: Re: Bug#985314: asterisk spams console output to syslog due to systemd misconfiguration
Date: Fri, 21 Jan 2022 01:07:45 +0530
Hello again,

On Fri, Jan 21, 2022 at 1:02 AM Utkarsh Gupta <utkarsh@debian.org> wrote:
> I don't think this was a problem in the patch that I attached to the
> bug but somehow it got introduced when some applied that and uploaded,
> maybe? I could be very wrong but I am trying to understand where did
> things go wrong.

Thanks, Sergio, for explaining me what'd I miss. Clearly my fault.
Thanks for the fix! :)


- u



Information forwarded to debian-bugs-dist@lists.debian.org, Debian VoIP Team <pkg-voip-maintainers@lists.alioth.debian.org>:
Bug#985314; Package src:asterisk. (Thu, 20 Jan 2022 20:03:08 GMT) (full text, mbox, link).


Acknowledgement sent to Jonas Smedegaard <jonas@jones.dk>:
Extra info received and forwarded to list. Copy sent to Debian VoIP Team <pkg-voip-maintainers@lists.alioth.debian.org>. (Thu, 20 Jan 2022 20:03:08 GMT) (full text, mbox, link).


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

From: Jonas Smedegaard <jonas@jones.dk>
To: 985314@bugs.debian.org, Sergio Durigan Junior <sergiodj@debian.org>, Utkarsh Gupta <utkarsh@debian.org>
Cc: 985314@bugs.debian.org
Subject: Re: Bug#985314: asterisk spams console output to syslog due to systemd misconfiguration
Date: Thu, 20 Jan 2022 20:59:41 +0100
[Message part 1 (text/plain, inline)]
Quoting Utkarsh Gupta (2022-01-20 20:32:35)
> Hi Sergio,
> 
> On Wed, Jan 19, 2022 at 10:26 PM Sergio Durigan Junior
> <sergiodj@debian.org> wrote:
> > "Editing patches by hand considered evil" :-).
> >
> > This upload introduced a problem: the asterisk.service file doesn't
> > contain the [Install] section anymore, which makes it be treated as a
> > static unit by systemd.  This means that the service cannot be
> > enabled/disabled, so when a reboot happens the service doesn't
> > automatically start.
> >
> > This has been reported in
> > https://bugs.launchpad.net/ubuntu/+source/asterisk/+bug/1958259, btw.
> >
> > The problem happened because the file d/p/systemd.patch was likely
> > edited by hand, but the diff header was not updated to reflect the new
> > lines that have been added.  Because of this, 'patch' silently drops the
> > last 6 lines of the diff when applying it.
> 
> I don't think this was a problem in the patch that I attached to the
> bug but somehow it got introduced when some applied that and uploaded,
> maybe? I could be very wrong but I am trying to understand where did
> things go wrong.

I was puzzled as well at first :-)

Seems to me that the problem existed in the patch as presented at 
https://bugs.debian.org/985314#5

That patch patches another patch.  Intent was to expand the inner file 
contrib/asterisk.service by 6 lines, but provided patch expanding only 
outer file debian/patches/systemd.patch by 6 lines without expanding 
inner file by the same amount.

This lines tells outer file to expand 6 lines - or more specifically to 
replace the 6 lines beginning at line 96 with 12 lines at same position:

> @@ -96,6 +96,12 @@

What is missing is something like this, telling the outer file to 
replace a single line, which is the instruction for the _inner_ file to 
expand by 6 lines (create a new file of length 55 lines instead of one 
of length 49 lines):

> @@ -81,7 +81,7 @@ Last-Update: 2016-04-02
>  +fi
>  --- /dev/null
>  +++ b/contrib/asterisk.service
> -@@ -0,0 +1,49 @@
> +@@ -0,0 +1,55 @@
>  +[Unit]
>  +Description=Asterisk PBX
>  +Documentation=man:asterisk(8)


 - 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 (application/pgp-signature, inline)]

Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sat, 05 Mar 2022 07:24:43 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: Sun Oct 8 03:06:08 2023; 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.