Red Hat Bugzilla – Bug 1372307
dnf-automatic does not run etckeeper's autocommit
Last modified: 2016-12-08 04:49:24 EST
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.
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.
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
Author: root <root@machine>
Date: Thu Sep 1 13:32:36 2016 +0200
committing changes in /etc after yum run
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
Changes to /etc are uncommitted.
Changes to /etc should be committed, like as if I would have run dnf update manually.
I create pull-request that fix the problem: https://github.com/rpm-software-management/dnf/pull/614
*** Bug 1402631 has been marked as a duplicate of this bug. ***