Bug#985314: asterisk spams console output to syslog due to systemd misconfiguration
Jonas Smedegaard
jonas at jones.dk
Thu Jan 20 19:59:41 GMT 2022
Quoting Utkarsh Gupta (2022-01-20 20:32:35)
> Hi Sergio,
>
> On Wed, Jan 19, 2022 at 10:26 PM Sergio Durigan Junior
> <sergiodj at 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-voip-maintainers/attachments/20220120/e4c0dd84/attachment-0001.sig>
More information about the Pkg-voip-maintainers
mailing list