Bug 1313890

Summary: missing BuildRequires for systemd causes FTBFS with EPEL-7 enabled
Product: Red Hat Enterprise Linux 7 Reporter: Kamil Dudka <kdudka>
Component: arpwatchAssignee: Jan Synacek <jsynacek>
Status: CLOSED ERRATA QA Contact: Robin Hack <rhack>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.2CC: jscotka, rhack
Target Milestone: rcKeywords: EasyFix, Patch
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: arpwatch-2.1a15-32.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-04 00:15:04 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 Kamil Dudka 2016-03-02 14:46:30 UTC
Description of problem:
Despite the arpwatch RPM package relies on systemd being installed at build time, the build-time dependency is missing in arpwatch.spec.  The build succeeds only in case /usr/sbin/sendmail is resolved to postfix, which itself requires systemd.  However, if /usr/sbin/sendmail is resolved to ssmtp, which is available in EPEL-7 and does not require systemd, the build of arpwatch fails badly.


Version-Release number of selected component (if applicable):
arpwatch-2.1a15-31.el7


How reproducible:
Easily.


Steps to Reproduce:
1. Add the EPEL-7 yum repo to the rhel-7-x86_64 mock profile.
2. brew download-build --arch=src arpwatch-2.1a15-31.el7
3. mock -vr rhel-7-x86_64 --rebuild arpwatch-2.1a15-31.el7.src.rpm


Actual results:
RPM build errors:
    bogus date in %changelog: Thu Jan 18 2013 Ales Ledvinka [...]
    File must begin with "/": %{_unitdir}/arpwatch.service


Expected results:
Build succeeds.


Additional info:
This bug could be fixed by the following one-line patch:
--- a/arpwatch.spec
+++ b/arpwatch.spec
@@ -15,6 +15,7 @@ Requires(preun): systemd-units
 Requires(postun): systemd-units
 Requires: /usr/sbin/sendmail
 BuildRequires: /usr/sbin/sendmail libpcap-devel
+BuildRequires: systemd

 Source0: ftp://ftp.ee.lbl.gov/arpwatch-%{version}.tar.gz
 Source1: arpwatch.service

Comment 4 Kamil Dudka 2016-03-04 14:01:41 UTC
Thank you for including the fix!

Comment 7 errata-xmlrpc 2016-11-04 00:15:04 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHEA-2016-2189.html