Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1372307 - dnf-automatic does not run etckeeper's autocommit
Summary: dnf-automatic does not run etckeeper's autocommit
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 24
Hardware: x86_64
OS: Unspecified
high
unspecified
Target Milestone: ---
Assignee: Jaroslav Mracek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1402631 (view as bug list)
Depends On:
Blocks:
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:
Clone Of:
Environment:
Last Closed: 2016-10-04 18:03:54 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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

Hi!

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
1.1.10
  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:
       +0:radvd-2.11-4.fc24.x86_64
   
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.