etckeeper doesn't commit. Missing executable permissions on /etc/etckeeper/commit.d/50vcs-commit

Bug #1402657 reported by Hilario J. Montoliu (hjmf)
28
This bug affects 7 people
Affects Status Importance Assigned to Milestone
etckeeper (Ubuntu)
Fix Released
High
Nobuto Murata
Utopic
Fix Released
Undecided
Unassigned

Bug Description

* Impact:
the command fails to run on incorrect permission issue

* Test case
see "To reproduce the problem" section of the description

* Regression potential
that only changing permission of one file, just test that the command works

------------------------------

Etckeeper doesn't work out of the box on Ubuntu 14.10

The command etckeeper commit fails without any output.

The problem is that the script 50vcs-commit doesn't have execution permissions.

Noticed in etckeeper at ubuntu 14.10

root@ulises2:/etc/etckeeper# lsb_release -rd
Description: Ubuntu 14.10
Release: 14.10
root@ulises2:/etc/etckeeper# apt-cache policy etckeeper
etckeeper:
  Installed: 1.11ubuntu1
  Candidate: 1.11ubuntu1
  Version table:
 *** 1.11ubuntu1 0
        500 http://archive.ubuntu.com/ubuntu/ utopic/main amd64 Packages
        100 /var/lib/dpkg/status

The root cause is that 50vcs-commit never gets executed because it lacks permissions:

root@ulises2:/etc/etckeeper# ls -la /etc/etckeeper/commit.d/
total 40
drwxr-xr-x 2 root root 4096 Dec 15 13:55 .
drwxr-xr-x 12 root root 4096 Dec 15 13:55 ..
-rwxr-xr-x 1 root root 447 Jun 4 2014 10vcs-test
-rwxr-xr-x 1 root root 138 Jun 4 2014 30bzr-add
-rwxr-xr-x 1 root root 302 Jun 4 2014 30darcs-add
-rwxr-xr-x 1 root root 138 Jun 4 2014 30git-add
-rwxr-xr-x 1 root root 143 Jun 4 2014 30hg-addremove
-rw-r--r-- 1 root root 2822 Jun 4 2014 50vcs-commit
-rwxr-xr-x 1 root root 264 Jun 4 2014 99push
-rw-r--r-- 1 root root 193 Jun 4 2014 README

To reproduce the problem:
--------------------------------------------------------------------

Install etckeeper on Ubuntu 14.04. Nothing gets commited.

root@ulises2:/etc/etckeeper# etckeeper init
Creado un standalone tree (formaot: 2a)
adding .bzrignore
adding .etckeeper
adding .java
adding ConsoleKit
adding ImageMagick
adding Muttrc
[...]

root@ulises2:/etc/etckeeper# etckeeper vcs status
unknown:
  .bzrignore
  .etckeeper
  .java/
  ConsoleKit/
  ImageMagick/
  Muttrc
  [...]

root@ulises2:/etc/etckeeper# etckeeper commit "initial revision"
root@ulises2:/etc/etckeeper# etckeeper vcs status
added:
  .bzrignore
  .etckeeper
  .java/
  .java/.systemPrefs/
  .java/.systemPrefs/.system.lock
  .java/.systemPrefs/.systemRootModFile
  [...]

To fix the problem
--------------------------------------------

Give exectuable permissions to /etc/etckeeper/commit.d/50vcs-commit::

chmod +x /etc/etckeeper/commit.d/50vcs-commit
etckeeper commit "initial revision"
etckeeper vcs log
------------------------------------------------------------
revno: 1
committer: hmontoliu <hmontoliu@ulises2>
branch nick: ulises2 /etc repository
timestamp: Mon 2014-12-15 14:09:54 +0100
message:
  initial revision

ProblemType: Bug
DistroRelease: Ubuntu 14.10
Package: etckeeper 1.11ubuntu1
ProcVersionSignature: Ubuntu 3.16.0-28.37-generic 3.16.7-ckt1
Uname: Linux 3.16.0-28-generic x86_64
NonfreeKernelModules: wl
ApportVersion: 2.14.7-0ubuntu8
Architecture: amd64
CurrentDesktop: Unity
Date: Mon Dec 15 13:59:32 2014
EcryptfsInUse: Yes
InstallationDate: Installed on 2013-10-16 (425 days ago)
InstallationMedia: Ubuntu 13.10 "Saucy Salamander" - Beta amd64 (20130925.1)
PackageArchitecture: all
SourcePackage: etckeeper
UpgradeStatus: Upgraded to utopic on 2014-12-13 (1 days ago)

Revision history for this message
Hilario J. Montoliu (hjmf) (hmontoliu) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in etckeeper (Ubuntu):
status: New → Confirmed
Revision history for this message
obadz (obadz) wrote :

Thanks Hilario for reporting! I was starting to feel abandoned given that nobody ever showed interest at https://bugs.launchpad.net/ubuntu/+source/etckeeper/+bug/1385885 ..

Revision history for this message
Hilario J. Montoliu (hjmf) (hmontoliu) wrote :

The problem with the executable permissions of 50vcs-commit is also present in vivid code:

hmontoliu@ulises2:/tmp$ bzr branch lp:ubuntu/vivid-proposed/etckeeper etckeeper-vivid-proposed
51 revisiones enramadas
hmontoliu@ulises2:/tmp$ ls -la etckeeper-vivid-proposed/commit.d/
total 40
drwxrwxr-x 2 hmontoliu hmontoliu 4096 dic 15 16:19 .
drwxrwxr-x 16 hmontoliu hmontoliu 4096 dic 15 16:19 ..
-rwxrwxr-x 1 hmontoliu hmontoliu 447 dic 15 16:19 10vcs-test
-rwxrwxr-x 1 hmontoliu hmontoliu 138 dic 15 16:19 30bzr-add
-rwxrwxr-x 1 hmontoliu hmontoliu 302 dic 15 16:19 30darcs-add
-rwxrwxr-x 1 hmontoliu hmontoliu 138 dic 15 16:19 30git-add
-rwxrwxr-x 1 hmontoliu hmontoliu 143 dic 15 16:19 30hg-addremove
-rw-rw-r-- 1 hmontoliu hmontoliu 2822 dic 15 16:19 50vcs-commit
-rwxrwxr-x 1 hmontoliu hmontoliu 336 dic 15 16:19 99push
-rw-rw-r-- 1 hmontoliu hmontoliu 193 dic 15 16:19 README
hmontoliu@ulises2:/tmp$ bzr branch lp:ubuntu/vivid/etckeeper etckeeper-vivid
Most recent Ubuntu Vivid version: 1.15ubuntu1
Packaging branch status: CURRENT
51 revisiones enramadas
hmontoliu@ulises2:/tmp$ ls -la etckeeper-vivid-proposed/commit.d/
total 40
drwxrwxr-x 2 hmontoliu hmontoliu 4096 dic 15 16:19 .
drwxrwxr-x 16 hmontoliu hmontoliu 4096 dic 15 16:19 ..
-rwxrwxr-x 1 hmontoliu hmontoliu 447 dic 15 16:19 10vcs-test
-rwxrwxr-x 1 hmontoliu hmontoliu 138 dic 15 16:19 30bzr-add
-rwxrwxr-x 1 hmontoliu hmontoliu 302 dic 15 16:19 30darcs-add
-rwxrwxr-x 1 hmontoliu hmontoliu 138 dic 15 16:19 30git-add
-rwxrwxr-x 1 hmontoliu hmontoliu 143 dic 15 16:19 30hg-addremove
-rw-rw-r-- 1 hmontoliu hmontoliu 2822 dic 15 16:19 50vcs-commit
-rwxrwxr-x 1 hmontoliu hmontoliu 336 dic 15 16:19 99push
-rw-rw-r-- 1 hmontoliu hmontoliu 193 dic 15 16:19 README

Revision history for this message
Hilario J. Montoliu (hjmf) (hmontoliu) wrote :

Last block should have been:

hmontoliu@ulises2:/tmp$ ls -la etckeeper-vivid/commit.d/
total 40
drwxrwxr-x 2 hmontoliu hmontoliu 4096 dic 15 16:20 .
drwxrwxr-x 16 hmontoliu hmontoliu 4096 dic 15 16:20 ..
-rwxrwxr-x 1 hmontoliu hmontoliu 447 dic 15 16:20 10vcs-test
-rwxrwxr-x 1 hmontoliu hmontoliu 138 dic 15 16:20 30bzr-add
-rwxrwxr-x 1 hmontoliu hmontoliu 302 dic 15 16:20 30darcs-add
-rwxrwxr-x 1 hmontoliu hmontoliu 138 dic 15 16:20 30git-add
-rwxrwxr-x 1 hmontoliu hmontoliu 143 dic 15 16:20 30hg-addremove
-rw-rw-r-- 1 hmontoliu hmontoliu 2822 dic 15 16:20 50vcs-commit
-rwxrwxr-x 1 hmontoliu hmontoliu 336 dic 15 16:20 99push
-rw-rw-r-- 1 hmontoliu hmontoliu 193 dic 15 16:20 README

Revision history for this message
Hilario J. Montoliu (hjmf) (hmontoliu) wrote :

Proposed fix: ser correct execution permissions of commit.d/50vcs-commit

Revision history for this message
Hilario J. Montoliu (hjmf) (hmontoliu) wrote :

Proposed fix: ser correct execution permissions of commit.d/50vcs-commit

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "ser correct execution permissions" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Changed in etckeeper (Ubuntu):
importance: Undecided → High
Revision history for this message
Valentin Lab (vaab) wrote :

If someone wanted to silently and efficiently deactivate etckeeper history tracking with the least action, this would be the best thing to do. Was hit by this also.

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

looks like a regression at 1.11ubuntu1/utopic-proposed

tags: 1.11ubuntu1
<snip>
branch nick: utopic-proposed
timestamp: Wed 2014-06-04 10:27:24 +0200
message:
  * Merge from Debian unstable. Remaining changes:
    - commit.d/50vcs-commit: Avoid failure in initial commit if etckeeper is
      not installed from a tty (like early during installation).
    - etckeeper.conf, debian/control: default to bzr
    - etckeeper: Ensure that LANG is set, default to UTF8, necessary for bzr
      to function properly in non-interactive shells (eg, cron); user's local
      LANG will override if set.
    - Makefile: Do not call the etckeeper.spec target in clean because it
      modifies the spec file instead of cleaning it.
    - README: Update tutorial to use bzr.
diff:
=== modified file 'commit.d/50vcs-commit' (properties changed: +x to -x)

Changed in etckeeper (Ubuntu):
assignee: nobody → Nobuto Murata (nobuto)
Revision history for this message
Sebastien Bacher (seb128) wrote :

Uploaded the permission fix to vivid and utopic

description: updated
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.15ubuntu2

---------------
etckeeper (1.15ubuntu2) vivid; urgency=medium

  * restore executable permission of /etc/etckeeper/commit.d/50vcs-commit,
    thanks to Hilario J. Montoliu for offering a patch, LP: #1402657
 -- Nobuto Murata <email address hidden> Sat, 14 Feb 2015 18:55:13 +0900

Changed in etckeeper (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Chris J Arges (arges) wrote : Please test proposed package

Hello Hilario, or anyone else affected,

Accepted etckeeper into utopic-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/etckeeper/1.11ubuntu1.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in etckeeper (Ubuntu Utopic):
status: New → Fix Committed
tags: added: verification-needed
Revision history for this message
Nobuto Murata (nobuto) wrote :

With a fresh install of etckeeper package from utopic-proposed, autocommit happens successfully. However upgrading etckeeper package from utopic to utopic-proposed does not recover executable permission. It's still missing exec permission. Probably because it's a conffile and hashsum is the same with or without executable permission.

This SRU fixes fresh install indeed, but I will attach "take2" patches to make sure upgrade users properly saved.

Revision history for this message
Nobuto Murata (nobuto) wrote :
Revision history for this message
Nobuto Murata (nobuto) wrote :
Changed in etckeeper (Ubuntu):
status: Fix Released → Confirmed
tags: added: verification-failed
removed: verification-needed
Nobuto Murata (nobuto)
Changed in etckeeper (Ubuntu Utopic):
status: Fix Committed → Confirmed
Revision history for this message
Hilario J. Montoliu (hjmf) (hmontoliu) wrote :

Hi, sorry for the delay. Just to confirm that the proposed package is still broken

I've tested the porposed package on utopic

* The fresh install works OK
* The upgrade as stated before doesn't fix the problema

HTH

Revision history for this message
Nobuto Murata (nobuto) wrote : Re: [Bug 1402657] Re: etckeeper doesn't commit. Missing executable permissions on /etc/etckeeper/commit.d/50vcs-commit

Right. v2 patch is in the sponsor queue and waiting for a sponsor at this
moment.
http://reqorts.qa.ubuntu.com/reports/sponsoring/

Revision history for this message
Sebastien Bacher (seb128) wrote :

sponsored to vivid and utopic

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package etckeeper - 1.15ubuntu3

---------------
etckeeper (1.15ubuntu3) vivid; urgency=medium

  * supplement the last upload. make sure to fix permission on package
    upgrade as well, LP: #1402657
 -- Nobuto Murata <email address hidden> Thu, 05 Mar 2015 22:51:17 +0900

Changed in etckeeper (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Chris J Arges (arges) wrote : Please test proposed package

Hello Hilario, or anyone else affected,

Accepted etckeeper into utopic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/etckeeper/1.11ubuntu1.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in etckeeper (Ubuntu Utopic):
status: Confirmed → Fix Committed
tags: removed: verification-failed
tags: added: verification-needed
Revision history for this message
Hilario J. Montoliu (hjmf) (hmontoliu) wrote :

Hello Chris

Tested with utopic-proposed; both upgrade and install fix the problem

tags: added: verification-done
removed: verification-needed
Revision history for this message
Hilario J. Montoliu (hjmf) (hmontoliu) wrote :

Tags updated to verification-done

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package etckeeper - 1.11ubuntu1.2

---------------
etckeeper (1.11ubuntu1.2) utopic; urgency=medium

  * supplement the last upload. make sure to fix permission on package
    upgrade as well, LP: #1402657
 -- Nobuto Murata <email address hidden> Thu, 05 Mar 2015 23:00:15 +0900

Changed in etckeeper (Ubuntu Utopic):
status: Fix Committed → Fix Released
Revision history for this message
Chris J Arges (arges) wrote : Update Released

The verification of the Stable Release Update for etckeeper has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.