package ecryptfs-utils 73-0ubuntu1 failed to install/upgrade: subprocess pre-removal script returned error exit status 1

Bug #350089 reported by Stanislav Savulchik
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
ecryptfs-utils (Ubuntu)
Triaged
High
Dustin Kirkland 
Jaunty
Triaged
High
Dustin Kirkland 

Bug Description

Binary package hint: ecryptfs-utils

The crash notification appeared after ubuntu installer had crashed.

ProblemType: Package
Architecture: i386
DistroRelease: Ubuntu 9.04
ErrorMessage: subprocess pre-removal script returned error exit status 1
Package: ecryptfs-utils 73-0ubuntu1
SourcePackage: ecryptfs-utils
Title: package ecryptfs-utils 73-0ubuntu1 failed to install/upgrade: subprocess pre-removal script returned error exit status 1
Uname: Linux 2.6.28-11-generic i686

Revision history for this message
Stanislav Savulchik (savulchik) wrote :
Revision history for this message
Stanislav Savulchik (savulchik) wrote :

I suppose the reason of the crash is that my home partition contains a user with .ecryptfs directory (intrepid version).
When jaunty installer tries to install ecryptfs-utils (and consequently tries to remove a previous intrepid version of the package) it fails.
I had to remove ecryptfs-utils in intrepid first in order to fix broken ecryptfs-utils package in jaunty.

Changed in ecryptfs-utils (Ubuntu):
assignee: nobody → kirkland
importance: Undecided → High
Revision history for this message
Daniele Napolitano (dnax88) wrote : apport-collect data

Architecture: i386
DistroRelease: Ubuntu 9.04
Package: ecryptfs-utils 73-0ubuntu1
PackageArchitecture: i386
ProcEnviron:
 PATH=(custom, no user)
 LANG=it_IT.UTF-8
 SHELL=/bin/bash
Uname: Linux 2.6.28-11-generic i686
UserGroups:

Revision history for this message
Daniele Napolitano (dnax88) wrote :
Matt Zimmerman (mdz)
Changed in ecryptfs-utils (Ubuntu Jaunty):
status: New → Triaged
Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Hi-

I'm not able to reproduce this issue.

I created a new virtual machine, running Intrepid, with an active encrypted-private directory. I upgraded to the latest Intrepid packages, rebooted, upgraded to Jaunty, and rebooted.

All upgrades proceeded successfully. Upon final reboot, I'm running ecryptfs-utils 73-0ubuntu2. I'm able to read and write my encrypted-private data.

Matt-

Since you marked this triaged, were you able to reproduce this issue?

:-Dustin

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Actually, I'm re-testing now...

I think this might have something to do with update-manager's logic.

It should not be removing ecryptfs-utils at all. It's possible that ecryptfs-utils needs a bit more loving in the seeds.

Stay tuned...

:-Dustin

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Okay, I retested this upgrade on the Intrepid server, from the command line, and do-release-upgrade does the right thing.

I'll test again this weekend with an Intrepid desktop and see if there's a problem on the desktop side...

:-Dustin

Revision history for this message
Stanislav Savulchik (savulchik) wrote :

I'll try to clarify the steps/actions i did before i faced with the issue.

I have several partitions on my hdd:
   sda1 - intrepid root partition
   sda6 - /home partition
   sda8 - debian lenny root partition
   sda7 - jaunty root partition

In intrepid I have ecryptfs-utils installed, but actually don't use it.

When jaunty beta has become available I tried to install it for testing on a separate sda7 partition using desktop-i386 cd.

During an installation process I was asked to assign mount points for partitions. I chose sda7 as a / partition and sda6 as a /home partition. Some steps later I created "jaunty" user with /home/jaunty home directory.

Before I faced with the ecryptfs-utils issue I also got https://bugs.launchpad.net/bugs/350087 .

After installation process had finished I rebooted my computer into jaunty. Update-manager reported a broken package ecryptfs-utils. Next I rebooted into intrepid, removed ecryptfs-utils, rebooted into jaunty, executed "sudo apt-get install -f" (if i'm not mistaken) and the package finally had been successfully installed.

I hope my explanation will help. Sorry for not providing it beforehand.

Revision history for this message
Dustin Kirkland  (kirkland) wrote : Re: [Bug 350089] Re: package ecryptfs-utils 73-0ubuntu1 failed to install/upgrade: subprocess pre-removal script returned error exit status 1

Stanislav-

How did you perform the actual upgrade?

Is this a desktop or server?

Did you follow the instructions at:
 * http://www.ubuntu.com/getubuntu/upgrading

:-Dustin

Revision history for this message
Stanislav Savulchik (savulchik) wrote :

Dustin,

It seems like you were not notified about https://bugs.launchpad.net/ubuntu/+source/ecryptfs-utils/+bug/350089/comments/8 .

I didn't upgrade intrepid to jaunty.
I installed jaunty into a separate partition with /home partition shared between intrepid and jaunty.

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Ah, thanks for keeping up with this.

So I'm quite confident at this point that intrepid -> jaunty upgrades are safe.

I've tested this 4 different times now, server, desktop, alternate
installations, etc.

Toward the bottom of your dpkg log, I can see ecryptfs-utils being
'removed'. This should not happen automatically in any situation.
I've been trying to figure out if and how ecryptfs-utils might be
inadvertently removed, and I'm confident at this point that there's no
standard path to get this to happen.

Do you think it's possible that you might have flagged ecryptfs-utils
for removal at some point?

:-Dustin

Revision history for this message
Stanislav Savulchik (savulchik) wrote :

I have reviewed a dpkg log too.

Removing ecryptfs-utils ...
ERROR: Cannot remove ecryptfs-utils, as it appears to be in use:
       [/home/larry/.ecryptfs]
dpkg: error processing ecryptfs-utils (--purge):
 subprocess pre-removal script returned error exit status 1

Just to notice, "larry" (sudoer) is my intrepid account where the package was previously installed.
The jaunty installation failed to remove it (frankly speaking I have no idea why it did tried to remove the package).

I am quite sure that I didn't ask the installer to do this at some point.

Moreover, it is not clear for me why jaunty installation checked intrepid's user home directory.. During the installation process I asked to create a separate user "jaunty" with its own home directory.

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

The code that checks this is the following:

        # Check home directories
        for i in `ls /home`; do
                if [ -d "/home/$i/.ecryptfs" ]; then
                        # If we find a .ecryptfs directory (or link) in a home,
                        # directory, then someone is using ecryptfs-utils, and
                        # we should not allow package removal
                        echo "ERROR: Cannot remove ecryptfs-utils, as it appears to be in use:" 1>&2
                        echo " [/home/$i/.ecryptfs]" 1>&2
                        exit 1
                fi
        done

The goal here is to prevent an administrator from inadvertently removing ecryptfs-utils, in case one of her users is actually using ecryptfs. Of course, the administrator has the ability to 'rm -rf /home/$i/.ecryptfs', if that's the appropriate action.

:-Dustin

Revision history for this message
Kerry Hatcher (kerry.hatcher) wrote :

Just ran my 3rd install and came across this bug. Not a problem until this install.

Revision history for this message
Eustaquio Rangel (eustaquiorangel) wrote :

Ok, here's what I did (the sudo's just to be sure):

cd ~
sudo mv .ecryptfs .ecryptfs-old
sudo apt-get install -f
sudo apt-get install ecryptfs-utils
sudo mv .ecryptfs-old .ecryptfs
logout

Worked!

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.