package clamav-daemon 0.98.6+dfsg-1ubuntu2 failed to install/upgrade: subprocess installed post-installation script returned error exit status 2

Bug #1438745 reported by Jeff Livingstone
110
This bug affects 14 people
Affects Status Importance Assigned to Milestone
clamav (Debian)
Fix Released
Unknown
clamav (Ubuntu)
Fix Released
High
Unassigned
Vivid
Fix Released
High
Unassigned

Bug Description

[SRU]

[Impact]

Bug shows up when user tries to upgrade any previous version of clamav to the version which is currently available inside vivid repo. Apt crashes with the following error message:

/var/lib/dpkg/info/clamav-daemon.postinst: 626: /var/lib/dpkg/info/clamav-daemon.postinst: cannot create : Directory nonexistent
dpkg: error processing package clamav-daemon (--install):
 subprocess installed post-installation script returned error exit status 2

This happens due to a typo inside postinst script. Variable $DEBCONFILE is used incorrectly instead of $DEBCONFFILE (note double F) which leads to generation of the incorrect output path.

This typo is on the path which gets executed only when debconf information is available for the package. It means that the issue doesn't show up during regular installation but crashes apt during updates.

This issue is important because all clamav users will observe the issue while upgrading from Utopic to Vivid.

[Test Case]

How to reproduce the issue and make sure that debdiff resolves it: http://pastebin.ubuntu.com/10879650/

[Regression Potential]

Change is minor and fixes obvious issue. We can't avoid fixing it because with this issue in place we won't be able to upgrade clamav in the future (all vivid users will meet this issue if we upload an updated package without this change).

[Original Description]

It looks like the location of the files is wrong in the installer. Is there an updated source perhaps?

ProblemType: Package
DistroRelease: Ubuntu 15.04
Package: clamav-daemon 0.98.6+dfsg-1ubuntu2
ProcVersionSignature: Ubuntu 3.19.0-10.10-generic 3.19.2
Uname: Linux 3.19.0-10-generic i686
ApportVersion: 2.17-0ubuntu1
Architecture: i386
Date: Tue Mar 31 09:58:57 2015
DuplicateSignature: package:clamav-daemon:0.98.6+dfsg-1ubuntu2:subprocess installed post-installation script returned error exit status 2
ErrorMessage: subprocess installed post-installation script returned error exit status 2
InstallationDate: Installed on 2014-11-15 (136 days ago)
InstallationMedia: Ubuntu 14.10 "Utopic Unicorn" - Release i386 (20141022.1)
ProcCmdline: BOOT_IMAGE=/boot/vmlinuz-3.19.0-10-generic root=UUID=1c4c0c04-1b26-466a-81e0-ebee5163b4d1 ro quiet splash vt.handoff=7
RelatedPackageVersions:
 dpkg 1.17.24ubuntu1
 apt 1.0.9.7ubuntu3
SourcePackage: clamav
Title: package clamav-daemon 0.98.6+dfsg-1ubuntu2 failed to install/upgrade: subprocess installed post-installation script returned error exit status 2
UpgradeStatus: No upgrade log present (probably fresh install)

Related branches

Revision history for this message
Jeff Livingstone (jrl-pharmagenie) wrote :
tags: removed: need-duplicate-check
Revision history for this message
scott mowerson (smowerson) wrote :

I had already successfully upgraded mu Ubuntu 14.10 to run the new 4.0 kernel (rebooted nicely):
~$ uname -r
4.0.0-040000-generic

So naturally, I decided to perform an early upgrade to Ubuntu 15.04:
sudo do-release-upgrade -d

I had a few config files that I copied to prevent losing my settings while letting the defaults be installed with the upgrade:
~$ sudo cp /etc/rkhunter.conf /etc/rkhunter.conf.oldery
~$ sudo cp /etc/default/netatalk /etc/default/netatalk.oldery
~$ sudo cp /etc/netatalk/AppleVolumes.default /etc/netatalk/AppleVolumes.default.oldery

When it got stuck (looping with this problem: bug/1438745).
(primary window kept trying and failing to configure clamav-daemon with some sort of error on line 626 unable to find or create something because nonexistent...)
Anywhoo, I was able to open a second terminal window. I used the new terminal window to do a few commands to try to manually run dpkg clamav-daemon (but this failed with same error).
Then the second window crashed along with dock and only window still active was the first one.
So I entered x (instead of r to recover) and was supprised to get CLI prompt.

So I decided to use apt-get to purge the clamav-daemon package and any associated config files:
sudo apt-get -fV purge clamav-daemon

And Since the above recommended auto-removing clamdscan, I followed with:
sudo apt-get -fV purge clamdscan

Once that was done, I tried to install them fresh:
sudo apt-get -fV install clamav-daemon clamdscan

And it worked with no errors!!
But it did suggest that I install a package named daemon, so I did:
sudo apt-get -fV install daemon

And that worked with no errors!!

So I ran update and upgrade:
sudo apt-get update
sudo apt-get upgrade
they both ran clean...

So then I rebooted:
sudo shutdown -r

And it booted up nicely into 15.04

And it was still running with the new linux kernel: 4.0.0-040000-generic (that I had applied earlier).

I still have to restore those config file settings that were overwritten during the upgrade:

~$ uname -r
4.0.0-040000-generic

~$ sudo cp /etc/rkhunter.conf /etc/rkhunter.conf.oldery

~$ sudo cp /etc/default/netatalk /etc/default/netatalk.oldery

~$ sudo cp /etc/netatalk/AppleVolumes.default /etc/netatalk/AppleVolumes.default.oldery

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in clamav (Ubuntu):
status: New → Confirmed
Changed in clamav:
status: Unknown → Fix Committed
Changed in clamav (Ubuntu):
importance: Undecided → High
Revision history for this message
Scott Kitterman (kitterman) wrote :
Changed in clamav (Ubuntu):
milestone: none → vivid-updates
status: Confirmed → Triaged
affects: clamav → ubuntu
Robie Basak (racb)
no longer affects: ubuntu
no longer affects: Ubuntu Vivid
Revision history for this message
Oleg Strikov (strikov-deactivatedaccount) wrote :

Debdiff attached.

[SRU]

[Impact]

Bug shows up when user tries to upgrade any previous version of clamav to the version which is currently available inside vivid repo. Apt crashes with the following error message:

/var/lib/dpkg/info/clamav-daemon.postinst: 626: /var/lib/dpkg/info/clamav-daemon.postinst: cannot create : Directory nonexistent
dpkg: error processing package clamav-daemon (--install):
 subprocess installed post-installation script returned error exit status 2

This happens due to a typo inside postinst script. Variable $DEBCONFILE is used incorrectly instead of $DEBCONFFILE (note double F) which leads to generation of the incorrect output path.

This typo is on the path which gets executed only when debconf information is available for the package. It means that the issue doesn't show up during regular installation but crashes apt during updates.

This issue is important because all clamav users will observe the issue while upgrading from Utopic to Vivid.

[Test Case]

How to reproduce the issue and make sure that debdiff resolves it: http://pastebin.ubuntu.com/10879650/

[Regression Potential]

Change is minor and fixes obvious issue. We can't avoid fixing it because with this issue in place we won't be able to upgrade clamav in the future (all vivid users will meet this issue if we upload an updated package without this change).

Revision history for this message
Robie Basak (racb) wrote :

Thanks Oleg! Uploaded.

I made a couple of really minor changes:

I ran update-maintainer, which should really have already been done on the upload of ubuntu1.

I added Closes: #778507 to the changelog, to make it easier on the next merge from Debian to see if the delta is still required (look unlikely because it's marked pending in Debian).

Scott: I'm not sure if convention is to have 0.98.6+dfsg-1ubuntu2.1 or 0.98.6+dfsg-1ubuntu3 while Vivid+1 has yet to open, so I've left it at 0.98.6+dfsg-1ubuntu3. I hope that's OK.

Changed in clamav (Ubuntu Vivid):
status: Triaged → In Progress
description: updated
Revision history for this message
Scott Kitterman (kitterman) wrote : Please test proposed package

Hello Jeff, or anyone else affected,

Accepted into vivid-proposed. The package will build now and be available in a few hours in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in clamav (Ubuntu Vivid):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Oleg Strikov (strikov-deactivatedaccount) wrote :

Verification done. Logs: http://pastebin.ubuntu.com/10880409/

tags: added: verification-done
removed: verification-needed
Revision history for this message
Scott Kitterman (kitterman) wrote : Update Released

The verification of the Stable Release Update for clamav has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "clamav-sru-1438745.debdiff" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

tags: added: patch
Revision history for this message
Scott Kitterman (kitterman) wrote : Please test proposed package

Hello Jeff, or anyone else affected,

Accepted into vivid-proposed. The package will build now and be available in a few hours in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: removed: verification-done
tags: added: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package clamav - 0.98.6+dfsg-1ubuntu4

---------------
clamav (0.98.6+dfsg-1ubuntu4) vivid; urgency=medium

  * No change upload to work around temporary archive ddeb issue

clamav (0.98.6+dfsg-1ubuntu3) vivid; urgency=medium

  * d/clamav-daemon.postinst.in: Fix typo which causes a crash while installing
    this package over any previous version (upgrading). Variable $DEBCONFILE
    has been used incorrectly inside the script instead of $DEBCONFFILE. This
    issue doesn't show up during regular installation (not upgrade) because
    the typo is on the path which gets executed only if debconf information is
    available for the package (LP: #1438745, #1447809, Closes: #778507).
 -- Scott Kitterman <email address hidden> Fri, 24 Apr 2015 22:19:57 -0400

Changed in clamav (Ubuntu Vivid):
status: Fix Committed → Fix Released
Changed in clamav (Debian):
status: Unknown → Fix Released
Mathew Hodson (mhodson)
Changed in clamav (Ubuntu):
milestone: vivid-updates → none
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.