Bug 1418790

Summary: Missing dependencies (hostname, find)
Product: [Fedora] Fedora Reporter: Alan Jenkins <alan.christopher.jenkins>
Component: etckeeperAssignee: Thomas Moschny <thomas.moschny>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 27CC: thomas.moschny, vogt
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-05-03 09:50:51 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Alan Jenkins 2017-02-02 17:57:59 UTC
Description of problem:

etckeeper requires `hostname` and `find`, but the RPM package does not declare these dependencies.

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

etckeeper-1.18.5-1.fc24.noarch
etckeeper-1.18.5-1.fc25.noarch

  Steps to Reproduce:

1. Install minimal Fedora system according to manpage for systemd-nspawn
2. Install etckeeper
3. etckeeper init && etckeeper commit

  Actual results:

# etckeeper commit
/etc/etckeeper/commit.d/20store-metadata: line 58: find: command not found
/etc/etckeeper/commit.d/20store-metadata: line 73: find: command not found
/etc/etckeeper/commit.d/50vcs-commit: line 24: hostname: command not found

  Expected results:

The above errors should not occur, because these dependencies should be installed automatically.

  Additional info:

$ rpm -q --requires etckeeper
/bin/sh
/bin/sh
/bin/sh
/bin/sh
config(etckeeper) = 1.18.5-1.fc24
crontabs
etckeeper-dnf = 1.18.5-1.fc24
git >= 1.5.4
perl
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PartialHardlinkSets) <= 4.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsXz) <= 5.2-1
systemd
systemd
systemd

Comment 1 Alan Jenkins 2017-02-02 18:10:24 UTC
Another missing dependency is `which`.

# etckeeper vcs log
/etc/etckeeper/vcs.d/50vcs-cmd: line 5: which: command not found
error: VCS (git) not set or not in PATH

Comment 2 Alan Jenkins 2017-08-08 12:17:05 UTC
I wrote a patch in GIT format at

https://github.com/sourcejedi/rpm-etckeeper.git missing-requires

I tried sending a pull request on src.fedoraproject.org, but access is denied if I push to my fork there, and attempting a remote pull request shows a HTTP 500 error.  I'm guessing both are because I haven't joined the Fedora packagers group :).


(I've also written an update for README.fedora, see

https://github.com/sourcejedi/rpm-etckeeper.git readme-dnf

Comment 3 Thomas Moschny 2017-08-08 12:27:22 UTC
Thanks for the patches and sorry for the delay - I will try to update etckeeper as soon as possible.

Comment 4 Thomas Moschny 2018-05-03 09:50:51 UTC
Fixed in https://bodhi.fedoraproject.org/updates/FEDORA-2018-e8052e9869 .

Comment 5 Gerald Vogt 2018-05-14 15:01:20 UTC
Unfortunately, the hostname dependency made it into the EL6 RPM. However, with EL6 (at least CentOS/RHEL/OL 6) /bin/hostname is provided by package net-tools. There is no package hostname unlike on EL7. Thus, etckeeper-1.18.7-2.el6.noarch.rpm cannot be installed on EL6 due to missing dependency with hostname...

Comment 6 Thomas Moschny 2018-05-14 15:43:33 UTC
(In reply to Gerald Vogt from comment #5)
> Unfortunately, the hostname dependency made it into the EL6 RPM. However,
> with EL6 (at least CentOS/RHEL/OL 6) /bin/hostname is provided by package
> net-tools. There is no package hostname unlike on EL7. Thus,
> etckeeper-1.18.7-2.el6.noarch.rpm cannot be installed on EL6 due to missing
> dependency with hostname...

See bug 1577707, fixed in https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-45ab07ba94 .