[SRU] etckeeper fail to work when installed during installation

Bug #661024 reported by Petter Reinholdtsen
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
etckeeper (Ubuntu)
Fix Released
Medium
Thierry Carrez
Maverick
Fix Released
Medium
Angel Abad

Bug Description

Binary package hint: etckeeper

TEST CASE:
I just tested to install maverick here at the University of Oslo, where we have customized the installation to install a few extra packages. One of the packages is etckeeper, which is installed very early in the installation process (in post-base-installer),
to get a record of every change in /etc/.

This worked just fine in lucid, but in maverick this breaks the installer. The reason is that bzr, the default VCS for etckeeper in Ubuntu, now refuses to commit changes before a name and email address has been configured. This used to work, but
now fail.

A fix would be for etckeeper to run bzr whoami 'Enoch Root <root@hostname>' or something similar to get the configuration to show up in ~root/.bazaar/bazaar.conf when initializing the repository. Another fix would be for bzr to accept "anonymous" commits like it did in Lucid.

Regression potential:
This change is tested in natty, so I think potential for regression is almost 0.

course of action for maverick:
Apply changes already applied in natty package.

Thanks!

Related branches

Thierry Carrez (ttx)
Changed in etckeeper (Ubuntu):
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Petter Reinholdtsen (pere-hungry) wrote :

Any hope of having this fixed in Maverik?

Revision history for this message
Thierry Carrez (ttx) wrote :

Analysis:
In the case of an early install, the logic to determine USER in /etc/etckeeper/commit.d/50vcs-commit fails to yield a valid USER, so EMAIL is not set when bzr commit is called (no name being stored in bzr whoami, this fails)

Solution would be to do something like:

ORIG_USER=$USER
USER=
...
  if [ -n "$USER" ]; then
      export EMAIL="$USER <$USER@$hostname>"
  else
      bzr whoami || export EMAIL="$ORIG_USER <$ORIG_USER@$hostname>"
  fi

This avoids setting bzr whoami artificially at install-time, still prefers stored creds if any are present, but defaulting to something valid rather than failing in the corner case of this bug.

Reducing priority since this doesn't affect post-install installations of etckeeper. i'll fix this if nobody beats me to it.

Changed in etckeeper (Ubuntu):
importance: High → Medium
status: Confirmed → Triaged
Revision history for this message
Thierry Carrez (ttx) wrote :

Fixing this in Maverick involves respinning an install media, since etckeeper at install-time will be pulled from the CD, so I don't think that will happen...

Changed in etckeeper (Ubuntu):
assignee: nobody → Thierry Carrez (ttx)
status: Triaged → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package etckeeper - 0.50ubuntu2

---------------
etckeeper (0.50ubuntu2) natty; urgency=low

  * commit.d/50vcs-commit: Avoid failure in initial commit if etckeeper
    is not installed from a tty (like early during installation) (LP: #661024)
 -- Thierry Carrez (ttx) <email address hidden> Wed, 15 Dec 2010 11:18:50 +0100

Changed in etckeeper (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Petter Reinholdtsen (pere-hungry) wrote :

For us at the university of Oslo, a fix in Maverick only have to show up with PXE installations, so no new media is needed to make us happy.

Revision history for this message
Thierry Carrez (ttx) wrote :

Interesting, sounds like a good target for SRU, then.
See https://wiki.ubuntu.com/StableReleaseUpdates#Procedure

Changed in etckeeper (Ubuntu Maverick):
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
George Klein (gk-t-t-l-deactivatedaccount) wrote :

I've just upgraded a server from Lucid to Maverick and been hit by this bug. From the comments above, I presume this has happened because I did the upgrade over ssh and not directly at a terminal.

I'll run bzr whoami as Petter suggests and see what happens with tonight's cron job.

Angel Abad (angelabad)
Changed in etckeeper (Ubuntu Maverick):
status: Triaged → In Progress
assignee: nobody → Angel Abad (angelabad)
description: updated
summary: - etckeeper fail to work when installed during installation
+ [SRU] etckeeper fail to work when installed during installation
Revision history for this message
Angel Abad (angelabad) wrote :

Package uploaded to maverick-proposed.

Thanks!

Revision history for this message
Angel Abad (angelabad) wrote :

Sorry, upload rejected, is a main package, I need an ubuntu sponsor :-D

Thanks!

Changed in etckeeper (Ubuntu Maverick):
status: In Progress → Confirmed
Revision history for this message
Benjamin Drung (bdrung) wrote :

Package uploaded to maverick-proposed.

Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Accepted etckeeper into maverick-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in etckeeper (Ubuntu Maverick):
status: Confirmed → Fix Committed
tags: added: verification-needed
Revision history for this message
Angel Abad (angelabad) wrote :

Testing the package it works well for me installing it without tty.

Thanks!

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

This bug was fixed in the package etckeeper - 0.48ubuntu1.1

---------------
etckeeper (0.48ubuntu1.1) maverick-proposed; urgency=low

  * commit.d/50vcs-commit: Avoid failure in initial commit if etckeeper
    is not installed from a tty (like early during installation) (LP:
    #661024)
 -- Angel Abad <email address hidden> Mon, 10 Jan 2011 16:51:44 +0100

Changed in etckeeper (Ubuntu Maverick):
status: Fix Committed → Fix Released
tags: added: testcase
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.