RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1275790 - spec file includes triggers with overlapping version intervals
Summary: spec file includes triggers with overlapping version intervals
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: cups
Version: 7.2
Hardware: All
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Zdenek Dohnal
QA Contact: Petr Sklenar
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-10-27 18:18 UTC by Jiri Popelka
Modified: 2016-11-04 06:46 UTC (History)
5 users (show)

Fixed In Version: cups-1.6.3-23.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-04 06:46:14 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:2459 0 normal SHIPPED_LIVE cups bug fix update 2016-11-03 14:05:23 UTC

Description Jiri Popelka 2015-10-27 18:18:21 UTC
Trying to build with newer rpm version (in Fedora) results in:

error: line 601: Trigger fired by the same package is already defined in spec file: %triggerin -- samba-client

That's because we have two '%triggerun -- %{name}' with overlapping version intervals:

<spec snippet>
%triggerun -- %{name} < 1:1.5.0-22
# This package is allowed to autostart; however, the upgrade trigger
# in Fedora 16 final failed to actually do this.  Do it now as a
# one-off fix for bug #748841.
/bin/systemctl --no-reload enable %{name}.{service,socket,path} >/dev/null 2>&1 || :

%triggerun -- %{name} < 1:1.5-0.9
# Save the current service runlevel info
# User must manually run systemd-sysv-convert --apply cups
# to migrate them to systemd targets
%{_bindir}/systemd-sysv-convert --save %{name} >/dev/null 2>&1 || :

# This package is allowed to autostart:
/bin/systemctl --no-reload enable %{name}.{service,socket,path} >/dev/null 2>&1 || :

# Run these because the SysV package being removed won't do them
/sbin/chkconfig --del cups >/dev/null 2>&1 || :
/bin/systemctl try-restart %{name}.service >/dev/null 2>&1 || :
</spec snippet>

The story behind these two triggers is bug #748841. Tim first fixed [1] the '< 1:1.5-0.9' trigger and then added [2] another trigger for already updated packages.

From bug #1247140, comment #1:
"Previously rpm didn't refuse to build packages with overlapping version intervals but rpm always set off only one trigger. So probably triggers in your package didn't work as you expected also in previous version of rpm."

So I think we should remove the '%triggerun -- %{name} < 1:1.5.0-22', because it might lead to some hard-to-reproduce problems when upgrading from RHEL-6.
We actually don't need it as the '< 1:1.5-0.9' trigger has already been correct.

[1] http://pkgs.fedoraproject.org/cgit/cups.git/commit/?id=d44ca3247c00727ecfc986027d847fe77c15250d
[2] http://pkgs.fedoraproject.org/cgit/cups.git/commit/?id=cb5964de441f16576888ef454b22a5ec5f7c1d83

Comment 1 Tim Waugh 2015-11-02 10:46:43 UTC
Agreed, nice analysis.

Comment 7 errata-xmlrpc 2016-11-04 06:46:14 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/RHBA-2016-2459.html


Note You need to log in before you can comment on or make changes to this bug.