etckeeper init is not executed on initial install

Bug #1532615 reported by Nobuto Murata
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
etckeeper (Ubuntu)
Fix Released
Low
Nobuto Murata

Bug Description

etckeeper on xenial does not kick initial commit on its fresh install. It seems ubuntu patch has debian/etckeeper.postinst over debian/postinst which has a logic to kick `etckeeper init`.

$ ls -1 etckeeper-1.18.1*/debian/*postinst
etckeeper-1.18.1/debian/postinst
etckeeper-1.18.1ubuntu2/debian/etckeeper.postinst
etckeeper-1.18.1ubuntu2/debian/postinst

[etckeeper-1.18.1ubuntu2/debian/postinst]
     80 if [ "$2" = "" ] && [ -e "/etc/etckeeper/etckeeper.conf" ]; then
     81 # Fresh install.
     82 . /etc/etckeeper/etckeeper.conf || true
     83 if [ -n "$VCS" ] && [ -x "`which $VCS 2>/dev/null`" ]; then
     84 if etckeeper init; then
     85 if ! etckeeper commit "Initial commit"; then
     86 echo "etckeeper commit failed; run it by hand" >&2
     87 fi
     88 else
     89 echo "etckeeper init failed; run it by hand" >&2
     90 fi
     91 else
     92 echo "etckeeper init not ran as $VCS is not installed" >&2
     93 fi
     94 fi

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: etckeeper 1.18.1ubuntu2
ProcVersionSignature: Ubuntu 4.3.0-5.16-generic 4.3.3
Uname: Linux 4.3.0-5-generic x86_64
ApportVersion: 2.19.3-0ubuntu2
Architecture: amd64
CurrentDesktop: Unity
Date: Mon Jan 11 06:20:50 2016
EcryptfsInUse: Yes
InstallationDate: Installed on 2016-01-09 (1 days ago)
InstallationMedia: Ubuntu 16.04 LTS "Xenial Xerus" - Alpha amd64 (20160108)
PackageArchitecture: all
SourcePackage: etckeeper
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Nobuto Murata (nobuto) wrote :
Revision history for this message
Nobuto Murata (nobuto) wrote :

Attached debdiff fixes the issue by properly merging ubuntu's preinst and postinst with the original ones.

Changed in etckeeper (Ubuntu):
status: New → In Progress
assignee: nobody → Nobuto Murata (nobuto)
status: In Progress → Confirmed
Mathew Hodson (mhodson)
Changed in etckeeper (Ubuntu):
importance: Undecided → Medium
importance: Medium → Low
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks, that makes sense, I've sponsored it now

Changed in etckeeper (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package etckeeper - 1.18.1ubuntu3

---------------
etckeeper (1.18.1ubuntu3) xenial; urgency=medium

  * properly merge preinst and postinst to fix initial commit on
    fresh install, LP: #1532615

 -- Nobuto Murata <email address hidden> Mon, 11 Jan 2016 07:02:16 +0900

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