daily autocommits with etckeeper/hg cause cron emails

Bug #364344 reported by Max Bowsher
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
etckeeper (Debian)
Fix Released
Unknown
etckeeper (Ubuntu)
Fix Released
Medium
Thierry Carrez

Bug Description

Binary package hint: etckeeper

I have etckeeper configured with a near-default configuration except that I am using hg, not bzr.

When a daily autocommit occurs with changes present, the following is emailed to root by cron:

/etc/cron.daily/etckeeper:
No username found, using 'root@hostname' instead

This is hg reporting that it is falling back to an autodetected username for the commit. I propose that this be fixed like this:

--- etckeeper_0.30ubuntu2_all.deb!/etc/cron.daily/etckeeper
+++ /etc/cron.daily/etckeeper 2009-04-20 23:28:35.000000000 +0100
@@ -2,6 +2,9 @@
 set -e
 if [ -x /usr/sbin/etckeeper ] && [ -e /etc/etckeeper/etckeeper.conf ]; then
  . /etc/etckeeper/etckeeper.conf
+ if [ "$VCS" = hg ]; then
+ export HGUSER=cron@`hostname --fqdn`
+ fi
  if [ "$AVOID_DAILY_AUTOCOMMITS" != "1" ]; then
   if etckeeper unclean; then
    etckeeper commit "daily autocommit" >/dev/null

Related branches

Thierry Carrez (ttx)
Changed in etckeeper (Ubuntu):
importance: Undecided → Medium
status: New → Confirmed
Thierry Carrez (ttx)
Changed in etckeeper (Ubuntu):
status: Confirmed → Triaged
Thierry Carrez (ttx)
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.37ubuntu1

---------------
etckeeper (0.37ubuntu1) karmic; urgency=low

  * Merge from debian unstable, remaining changes:
    - etckeeper.conf, debian/control: default to bzr
  * debian/postinst: Do the initial commit at installation time (LP: #297920)
  * commit.d/50vcs-commit: Avoid etckeeper commit failure if 'hostname -f'
    fails (LP: #377265)
  * debian/cron.daily: Avoid cron emails with daily autocommits if VCS=hg
    (LP: #364344)

etckeeper (0.37) unstable; urgency=low

  * Make postinst check for the configured VCS before trying to run
    etckeeper init. Closes: #530497
  * Update French debconf translation. Closes: #530795
  * Fix typo in cruft file. Closes: #530819
  * Update Portuguese debconf translation. Closes: #528109
  * Update German debconf translation. Closes: #532346

etckeeper (0.36) unstable; urgency=low

  * Add cruft ignore file. Closes: #522513
  * Update Japanese debconf translation. Closes: #527921
  * Update Swedish debconf translation. Closes: #528575
  * Update Russian debconf translation. Closes: #528798

etckeeper (0.35) unstable; urgency=low

  * Make etckeeper uninit -f disable the prompt.
  * Uninit on purge, guarded by a debconf prompt. Closes: #527218

 -- Thierry Carrez <email address hidden> Tue, 16 Jun 2009 11:02:03 +0200

Changed in etckeeper (Ubuntu):
status: In Progress → Fix Released
Changed in etckeeper (Debian):
status: Unknown → New
Changed in etckeeper (Debian):
status: New → 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.