upgrade 10.04 to 14.04 failed - package samba-common 2:4.1.6+dfsg-1ubuntu2.14.04.7 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1

Bug #1451322 reported by Norman Henderson
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
samba (Ubuntu)
Expired
High
Unassigned

Bug Description

Running do-release-upgrade - system generated a bug report

ProblemType: Package
DistroRelease: Ubuntu 14.04
Package: samba-common 2:4.1.6+dfsg-1ubuntu2.14.04.7
ProcVersionSignature: Ubuntu 3.2.0-80.116-generic-pae 3.2.68
Uname: Linux 3.2.0-80-generic-pae i686
ApportVersion: 2.14.1-0ubuntu3.10
Architecture: i386
Date: Mon May 4 04:23:11 2015
DuplicateSignature: package:samba-common:2:4.1.6+dfsg-1ubuntu2.14.04.7:subprocess installed post-installation script returned error exit status 1
ErrorMessage: subprocess installed post-installation script returned error exit status 1
InstallationDate: Installed on 2012-10-24 (921 days ago)
InstallationMedia: Ubuntu-Server 12.04 LTS "Precise Pangolin" - Release i386 (20120424.1)
PackageArchitecture: all
SambaClientRegression: Yes
SourcePackage: samba
Title: package samba-common 2:4.1.6+dfsg-1ubuntu2.14.04.7 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
UpgradeStatus: Upgraded to trusty on 2015-05-04 (0 days ago)

Revision history for this message
Norman Henderson (norm-audrey) wrote :
Revision history for this message
Norman Henderson (norm-audrey) wrote :

Attempting to recover by: aptitude install smbclient samba-common
Resulted in:
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install. Trying to recover:
Setting up samba-common (2:4.1.6+dfsg-1ubuntu2.14.04.7) ...
rmdir: failed to remove â/etc/dhcp3/dhclient-enter-hooks.dâ: No such file or directory

tags: removed: need-duplicate-check
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in samba (Ubuntu):
status: New → Confirmed
Revision history for this message
Robie Basak (racb) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better.

The relevant code from samba-common.postinst is:

# Clean up the now-empty dir which our conffile was previously in,
# since it wasn't empty at the time dpkg could automatically remove it
# for us.
if dpkg --compare-versions "$2" lt-nl 2:4.1.4+dfsg-2~
then
 rmdir -p --ignore-fail-on-non-empty /etc/dhcp3/dhclient-enter-hooks.d
fi

and the postinst error is:

rmdir: failed to remove ‘/etc/dhcp3/dhclient-enter-hooks.d’: No such file or directory

It seems to me that the postinst is missing a test for the directory first, and the code is still present in Debian VCS master. This needs a more detailed look.

Changed in samba (Ubuntu):
importance: Undecided → High
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Hello,

sorry for the lack of responses in this bug.

The postinst code in samba-common still doesn't check if the directory exists before attempting to remove it, so the bug is still there, but it only kicks in if upgrading from a package older than 4.1.4.

I tried reproducing the problem with a precise-to-trusty do-release-upgrade, with samba installed, but it didn't happen. Maybe coming from Lucid something else triggers the bug, but Lucid is EOL. Technically Precise is EOL too, but there is the possibility of using precise-esm (https://ubuntu.com/esm), so if this happens when upgrading Precise to Trusty, we can probably fix it.

I will mark this bug as incomplete pending a confirmation that it happens when upgrading Precise to Trusty.

Changed in samba (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for samba (Ubuntu) because there has been no activity for 60 days.]

Changed in samba (Ubuntu):
status: Incomplete → Expired
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.