Bug 1246911

Summary: FTBFS: Trigger fired by the same package is already defined in spec file
Product: [Fedora] Fedora Reporter: Miro Hrončok <mhroncok>
Component: nfs-utilsAssignee: Steve Dickson <steved>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: bcodding, bfields, ffesti, jiyin, jlayton, steved
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-12-02 15:34:38 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:
Bug Depends On: 1287559    
Bug Blocks:    
Attachments:
Description Flags
build.log from failed buildSRPMFromSCM Koji task none

Description Miro Hrončok 2015-07-26 21:51:20 UTC
Created attachment 1056380 [details]
build.log from failed buildSRPMFromSCM Koji task

Description of problem:
error: line 260: Trigger fired by the same package is already defined in spec file: %triggerin -- nfs-utils < 1:1.3.1-4.0

Version-Release number of selected component (if applicable):
nfs-utils-1.3.2-11.fc24

How reproducible:
Always

Steps to Reproduce:
1. `fedpkg build` nfs-utils

Actual results:
Generating SRPM (buildSRPMFromSCM) fails.

http://koji.fedoraproject.org/koji/taskinfo?taskID=10489218

Also attached build.log in case it gets deleted form Koji.

Expected results:
Package builds fine, as it does on f23.

Additional info:
rpm 4.12.90 landed a rawhide, possibly causing the difference between f23 and rawhide

Comment 1 Miro Hrončok 2015-07-26 21:52:03 UTC
Florian, is there some new behavior about this in the new rpm?

Comment 2 Miro Hrončok 2015-07-26 21:56:08 UTC
To save you some work, here are the triggers:

%triggerun -- nfs-utils < 1:1.2.4-2
/bin/systemctl enable nfs-lock.service >/dev/null 2>&1 || :
if /sbin/chkconfig --level 3 nfs ; then
	/bin/systemctl enable nfs-server.service >/dev/null 2>&1 || :
fi

%triggerin -- nfs-utils < 1:1.3.0-0.2
/bin/systemctl restart nfs-config >/dev/null 2>&1 || :

%triggerin -- nfs-utils < 1:1.3.0-7.1
/bin/systemctl stop rpc-svcgssd  >/dev/null 2>&1 || :

Line 260: %triggerin -- nfs-utils < 1:1.3.1-4.0
# reset configuration files and running daemons
if [ $1 -eq 2 ] ; then
	/bin/systemctl enable nfs-client.target >/dev/null 2>&1 || :
	/bin/systemctl restart nfs-config  >/dev/null 2>&1 || :
	/bin/systemctl restart nfs-client.target  >/dev/null 2>&1 || :
fi

Comment 3 Michael Schwendt 2015-11-03 12:01:53 UTC
see e.g. bug 585384

Comment 4 Michael Schwendt 2015-11-03 12:06:01 UTC
bug 702378 comment 2

Comment 5 Steve Dickson 2015-12-02 15:34:38 UTC
commit 229e956ba724d20b2cebc1050ae1f0e12a6bbd87
Author: Steve Dickson <steved>
Date:   Wed Nov 4 07:13:52 2015 -0500

    Removed legacy triggers to remove rpm build errors
    
    Signed-off-by: Steve Dickson <steved>

Comment 8 Florian Festi 2016-07-04 18:32:35 UTC
There is a short coming in the trigger implementation allowing only one trigger of each type per triggering package. Former versions of rpm just ignored the second trigger while rpmbuild now issues an error. IN the long run this short coming should be adressed but this has not happened so far.