Bug 1372307 - dnf-automatic does not run etckeeper's autocommit
Summary: dnf-automatic does not run etckeeper's autocommit
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf   
(Show other bugs)
Version: 24
Hardware: x86_64
OS: Unspecified
Target Milestone: ---
Assignee: Jaroslav Mracek
QA Contact: Fedora Extras Quality Assurance
Keywords: Triaged
: 1402631 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2016-09-01 11:35 UTC by Alexander Groß
Modified: 2016-12-08 09:49 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-10-04 18:03:54 UTC
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Alexander Groß 2016-09-01 11:35:16 UTC
Description of problem:


I use etckeeper to manage my /etc files with git. I was using CentOS 7 with yum and yum-cron before, and yum-cron would auto-commit changes to /etc files after updates. 

I have a Fedora 24 machine with dnf-automatic to essentially get the same automatic update behavior. dnf-automatic does not seem to load dnf plugins like etckeeper, hence changes to /etc due to updated packages are not automatically committed.

Version-Release number of selected component (if applicable):

[root@router ~]# dnf --version
  Installed: dnf-0:1.1.10-1.fc24.noarch at 2016-08-20 14:13
  Built    : Fedora Project at 2016-08-18 14:39

  Installed: rpm-0:4.13.0-0.rc1.27.fc24.x86_64 at 2016-07-13 19:27
  Built    : Fedora Project at 2016-04-25 13:45
[root@router ~]# dnf info dnf-automatic
Last metadata expiration check: 1:18:30 ago on Thu Sep  1 11:58:18 2016.
Installed Packages
Name        : dnf-automatic
Arch        : noarch
Epoch       : 0
Version     : 1.1.10
Release     : 1.fc24
Size        : 35 k
Repo        : @System
From repo   : updates
Summary     : Alternative CLI to "dnf upgrade" suitable for automatic, regular execution.
URL         : https://github.com/rpm-software-management/dnf
License     : GPLv2+ and GPLv2 and GPL
Description : Alternative CLI to "dnf upgrade" suitable for automatic, regular execution.

How reproducible:

Every time dnf-automatic updates packages that cause changes to files in /etc or new files in /etc.

Steps to Reproduce:
1. dnf install etckeeper dnf-automatic
   (Installs etckeeper, etckeeper-dnf, dnf-automatic)

2. cd /etc && etckeeper init && etckeeper commit baseline

3. Verify that etckeeper's dnf integration works by running e.g.:
   dnf install -y radvd
   etckeeper vcs log -1

   Should print:

   commit 3cd6be4a98bab8e708d93cc8c18c51656ea2722b
   Author: root <root@machine>
   Date:   Thu Sep 1 13:32:36 2016 +0200

       committing changes in /etc after yum run

       Package changes:
3. sed -i 's/apply_updates = no/apply_update = yes/' /etc/dnf/automatic.conf

4. systemctl enable dnf-automatic.timer && systemctl start dnf-automatic.timer

5. Wait for updates to appear

Actual results:

Changes to /etc are uncommitted.

Expected results:

Changes to /etc should be committed, like as if I would have run dnf update manually.

Comment 1 Jaroslav Mracek 2016-09-19 12:48:09 UTC
I create pull-request that fix the problem: https://github.com/rpm-software-management/dnf/pull/614

Comment 2 Alexander Groß 2016-10-04 18:10:11 UTC
Many thanks!

Comment 3 Igor Gnatenko 2016-12-08 09:49:24 UTC
*** Bug 1402631 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.