Bug 1535287 - Obsoletes directives in RPM spec need full package names
Summary: Obsoletes directives in RPM spec need full package names
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: clamav
Version: 27
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Sergio Basto
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-01-17 03:51 UTC by Evan Zacks
Modified: 2018-01-26 17:56 UTC (History)
11 users (show)

Fixed In Version: clamav-0.99.2-18.fc27 clamav-0.99.2-18.fc26
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-01-25 07:14:45 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
use full package names for Obsoletes directives (1.27 KB, patch)
2018-01-17 03:51 UTC, Evan Zacks
no flags Details | Diff

Description Evan Zacks 2018-01-17 03:51:08 UTC
Created attachment 1382207 [details]
use full package names for Obsoletes directives

Description of problem:

Commit e817c70f8e0665474ba876a857042f3e427c5dd6 adds Obsoletes directives for various -sysvinit packages (for certain build configurations, e.g., '--with sysv' isn't specified).

The directives, however, do not use the full package names; the leading "clamav-" is omitted. This causes upgrades to fail from a sysvinit configuration to a systemd one.


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

f26, f27, epel7 branches


How reproducible:

Always, when moving sysvinit to systemd.


Steps to Reproduce:

Build/install 0.99.2-15 --with sysv:

git checkout -b before-obsoletes 252e9b4
cp * ~/rpmbuild/SOURCES/
touch ~/rpmbuild/SOURCES/{main-58,daily-2420,bytecode-319}.cvd
( cd ~/rpmbuild/SOURCES; curl -LO 'https://www.clamav.net/downloads/production/clamav-0.99.2.tar.gz{,.sig}' )

rpmbuild -ba clamav.spec --with unrar --without bytecode --with sysv
find ~/rpmbuild/RPMS/ -type f -name 'clamav*-0.99.2-15*' \! -name 'clamav-data-empty*'  \! -name 'clamav*-systemd*' | xargs sudo yum -y localinstall


Build/install (update) to 0.99.2-16 --without sysv:

git checkout -b obsoletes-missing-prefix e817c70
rpmbuild -ba clamav.spec --with unrar --without bytecode --without sysv
find ~/rpmbuild/RPMS/ -type f -name 'clamav*-0.99.2-16*' \! -name 'clamav-data-empty*'  \! -name 'clamav*-sysv*' | xargs sudo yum -y localinstall


Actual results:

Update fails:

Error: Package: clamav-milter-sysvinit-0.99.2-15.el7.centos.noarch (installed)
           Requires: clamav-milter = 0.99.2-15.el7.centos
Error: Package: clamav-scanner-sysvinit-0.99.2-15.el7.centos.noarch (installed)
           Requires: clamav-scanner = 0.99.2-15.el7.centos
Error: Package: clamav-server-sysvinit-0.99.2-15.el7.centos.noarch (installed)
           Requires: clamav-server = 0.99.2-15.el7.centos

Expected results:

Update succeeds, with sysv packages being removed due to obsoletion.

After applying the attached patch, against -18:

Installing:
 clamav-milter                     x86_64            0.99.2-18.el7.centos
     replacing  clamav-milter-sysvinit.noarch 0.99.2-15.el7.centos
 clamav-milter-systemd             noarch            0.99.2-18.el7.centos
 clamav-scanner                    noarch            0.99.2-18.el7.centos
     replacing  clamav-scanner-sysvinit.noarch 0.99.2-15.el7.centos
 clamav-scanner-systemd            noarch            0.99.2-18.el7.centos
 clamav-server                     x86_64            0.99.2-18.el7.centos
     replacing  clamav-server-sysvinit.noarch 0.99.2-15.el7.centos
 clamav-server-systemd             noarch            0.99.2-18.el7.centos


Additional info:

The attached patch appears to resolve the issue.

Comment 1 Sergio Basto 2018-01-17 04:23:53 UTC
oops , patch applied , many thanks

Comment 2 Fedora Update System 2018-01-17 21:36:48 UTC
clamav-0.99.2-18.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-2a1f469c85

Comment 3 Fedora Update System 2018-01-17 21:38:58 UTC
clamav-0.99.2-18.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2018-a86bad9689

Comment 4 Fedora Update System 2018-01-17 21:39:36 UTC
clamav-0.99.2-18.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-11ba3bced1

Comment 5 Fedora Update System 2018-01-18 00:31:43 UTC
clamav-0.99.2-18.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-11ba3bced1

Comment 6 Fedora Update System 2018-01-18 01:18:13 UTC
clamav-0.99.2-18.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-a86bad9689

Comment 7 Fedora Update System 2018-01-18 02:12:02 UTC
clamav-0.99.2-18.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-2a1f469c85

Comment 8 Fedora Update System 2018-01-25 07:14:45 UTC
clamav-0.99.2-18.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2018-01-26 17:56:11 UTC
clamav-0.99.2-18.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.


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