You are here: / home / Debian

Wed, 04 Apr 2018

Automatic OTRS ticket creation for Debian package updates

I recently stumbled about the problem, that I have to create specific tickets in our OTRS system for package upgrades on our Debian servers. Background is, that we use OTRS for our ITIL change management processes.

To be more precise: The actual problem isn't to create the tickets - there are plenty of tools to do that, but to create them in a way I found them useful. apticron not only sends a mail for pending package upgrades (and downloads them if you want to), it also calls apt-listchanges which will show you the changelog entries of the packages you are about to install. You see so not only that you have to install upgrades, but also why.

However, I didn't found a way to change the mail, or add a specific header to the mail. Which would have been a big plus - as you can remote control OTRS via e-mail header quite a lot. And as I am lazy, that is something I definitely wanted to have.

Same for unattended-upgrades. Nice tool, but doesn't allow to change the mail content / header. (At least I didn't found a way to do so.)

I was pleasantly surprised, that cron-apt not only allows to add headers, it also lists some examples for OTRS headers in its documentation! However, by default it only lists (and downloads) packages to be upgrades. No changelogs. There is an open whishlist bug to get this feature added, but considering the age of the bug, I wouldn't hold my breath till it is implemented ;)

There is a solution for this problem, though. Although it is a bit ugly: And as I'm apparently not the only one interested in it, I'll write it down here (partly because I'm interested to find out, if my blog is still working after quite some years of inactivity). The basic idea is to call apt-listchanges on all deb files in /var/cache/apt/archives/. As there might be some cruft laying around, you'll have to run apt-clean before that. As we have a proxy and enough bandwidth that is acceptable in our case.

First you'll have to install the cron-apt and apt-listchanges. Add a file into /etc/cron-apt/action.d/1-clean containing: clean. This will cause cron-apt to call apt-get clean on each invocation and this cleaning all files in /var/cache/apt/archives. Next create a file /etc/cron-apt/action.d/4-listchanges containing the line:/var/cache/apt/archives/*.deb and a file /etc/cron-apt/config.d/4-listchanges containing the lines:

APTCOMMAND=/usr/bin/apt-listchanges
OPTIONS=""

Finally we have to configure cron-apt to actually mail our stuff. Thus create /etc/cron-apt/config similar and add the following:

# where to send mails
MAILTO="otrs@ourcompany.example"
# mail, when the apt calls create output (see documentation for other options)
MAILON="output"

XHEADER1="X-OTRS-Priority: 3 normal - prio 3"
XHEADER2="X-OTRS-Queue: The::Queue::You:Want::it::in"
XHEADER3="X-OTRS-SenderType: system"
XHEADER4="X-OTRS-Loop: false"
XHEADER5="X-OTRS-DynamicField-...: ..."
..
..
..

Bingo! Automated tickets for our change management process with all information required and automated as much as possible to avoid clicking through the web interface.

postet at 16:51 into [Debian] permanent link


Tue, 12 Mar 2013

A pledge about a certain Debian mailing list

I hereby pledge, that for every mail I send into a thread on the private Debian list with more than 10 mails, I will fix a release critical bug in a foreign package.

postet at 13:42 into [Debian] permanent link


Fri, 29 Jun 2012

Release Critical Bug report for Week 26

The bug webinterface of the Ultimate Debian Database currently knows about the following release critical bugs:

In Total:1088
Affecting Wheezy:697
Wheezy only:128
Remaining to be fixed in Wheezy:569

Of these 569 bugs, the following tags are set:

Pending in Wheezy:21
Patched in Wheezy:77
Duplicates in Wheezy:57
Can be fixed in a security Update:22
Contrib or non-free in Wheezy:8
Claimed in Wheezy:1
Delayed in Wheezy:2
Otherwise fixed in Wheezy:44

Ignoring all the above (multiple tags possible) 375 bugs need to be fixed by Debian Contributors to get Debian 7.0 Wheezy released.

However, with the view of the Release Managers, 603 need to be dealt with for the release to happen.

Please see Interpreting the release critical bug statistics for an explanation of the different numbers.

postet at 15:01 into [Debian/rc-stats/7.0-wheezy] permanent link


Fri, 22 Jun 2012

Release Critical Bug report for Week 25

The bug webinterface of the Ultimate Debian Database currently knows about the following release critical bugs:

In Total:1167
Affecting Wheezy:771
Wheezy only:189
Remaining to be fixed in Wheezy:582

Of these 582 bugs, the following tags are set:

Pending in Wheezy:31
Patched in Wheezy:82
Duplicates in Wheezy:57
Can be fixed in a security Update:21
Contrib or non-free in Wheezy:11
Claimed in Wheezy:2
Delayed in Wheezy:5
Otherwise fixed in Wheezy:47

Ignoring all the above (multiple tags possible) 376 bugs need to be fixed by Debian Contributors to get Debian 7.0 Wheezy released.

However, with the view of the Release Managers, 671 need to be dealt with for the release to happen.

Please see Interpreting the release critical bug statistics for an explanation of the different numbers.

postet at 15:01 into [Debian/rc-stats/7.0-wheezy] permanent link


Fri, 15 Jun 2012

Release Critical Bug report for Week 24

The bug webinterface of the Ultimate Debian Database currently knows about the following release critical bugs:

In Total:1289
Affecting Wheezy:862
Wheezy only:180
Remaining to be fixed in Wheezy:682

Of these 682 bugs, the following tags are set:

Pending in Wheezy:37
Patched in Wheezy:86
Duplicates in Wheezy:57
Can be fixed in a security Update:22
Contrib or non-free in Wheezy:10
Claimed in Wheezy:2
Delayed in Wheezy:2
Otherwise fixed in Wheezy:41

Ignoring all the above (multiple tags possible) 466 bugs need to be fixed by Debian Contributors to get Debian 7.0 Wheezy released.

However, with the view of the Release Managers, 757 need to be dealt with for the release to happen.

Please see Interpreting the release critical bug statistics for an explanation of the different numbers.

postet at 15:01 into [Debian/rc-stats/7.0-wheezy] permanent link


[1] 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84  >>

About

Alexander Tolimar Reichle-Schmehl lives in Tuttlingen / Germany. He works as IT manager (specialized on Unix and SAN/Storage) for an international automotive supplier.

Links