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 999017 - Error in PREIN scriptlet in rpm package ca-certificates
Summary: Error in PREIN scriptlet in rpm package ca-certificates
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: ca-certificates
Version: 7.0
Hardware: All
OS: Linux
unspecified
high
Target Milestone: beta
: ---
Assignee: Kai Engert (:kaie) (inactive account)
QA Contact: Aleš Mareček
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-20 14:24 UTC by Aleš Mareček
Modified: 2014-06-18 05:13 UTC (History)
1 user (show)

Fixed In Version: ca-certificates-2013.1.94-70.1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-13 11:22:39 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
patch (2.46 KB, patch)
2013-10-18 15:34 UTC, Kai Engert (:kaie) (inactive account)
no flags Details | Diff

Description Aleš Mareček 2013-08-20 14:24:50 UTC
Description of problem:
When some files from package are deleted, it's not possible to reinstall the package after then.

Version-Release number of selected component (if applicable):
ca-certificates-2012.87-10.1.el7.noarch

How reproducible:
Always

Steps to Reproduce:
0. mkdir ~/backup ; cp -r /etc/pki/java/cacerts /etc/pki/tls/certs/ca-bundle.crt /etc/pki/tls/certs/ca-bundle.trust.crt ~/backup
1. rm -rf /etc/pki/java/cacerts /etc/pki/tls/certs/ca-bundle.crt /etc/pki/tls/certs/ca-bundle.trust.crt
2. yum -y reinstall ca-certificates


Actual results:
It's not possible to reinstall package:
- SNIP -
mv: cannot stat ‘/etc/pki/java/cacerts’: No such file or directory
mv: cannot stat ‘/etc/pki/tls/certs/ca-bundle.crt’: No such file or directory
mv: cannot stat ‘/etc/pki/tls/certs/ca-bundle.trust.crt’: No such file or directory
error: %pre(ca-certificates-2012.87-10.1.el7.noarch) scriptlet failed, exit status 1
Error in PREIN scriptlet in rpm package ca-certificates-2012.87-10.1.el7.noarch
- SNIP -

Expected results:
Reinstallation possible

Additional info:

Comment 2 Kai Engert (:kaie) (inactive account) 2013-10-18 15:24:44 UTC
I can confirm this bug using RHEL-7.0-20131018.n.0

For my local testing of updated packages (where I cannot use "yum" for reinstall), I require a way to reproduce using "rpm".

The bug can be reproduced by
wget http://download.devel.redhat.com/brewroot/packages/ca-certificates/2013.1.94/70.0.el7/noarch/ca-certificates-2013.1.94-70.0.el7.noarch.rpm
rm -f /etc/pki/java/cacerts /etc/pki/tls/certs/ca-bundle.crt /etc/pki/tls/certs/ca-bundle.trust.crt
rpm -Uvh --force ca-certificates-2013.1.94-70.0.el7.noarch.rpm

Cause:
The %pre script attempts to create backups of old configuration files.
If there isn't an old configuration files, the "mv" command fails.

Solution:
Only consider creating the backup file if an old configuration file actually exists.

Comment 3 Kai Engert (:kaie) (inactive account) 2013-10-18 15:34:11 UTC
Ales, if you'd like to test the fixed package, please feel free to use my beaker system hp-dl380pgen8-02-vm-9.lab.bos.redhat.com

I prepared a scratch build package with the suggested fix, it's available from https://brewweb.devel.redhat.com/taskinfo?taskID=6437978
(and already downloaded to the beaker system in "/root". Y copy of the the previous package is in that directory, too.)

Installing the newer package is possible (and repairs the symbolic links).

If the newer package is installed, and you remove the files again, reinstalling the newer package (rpm -Uvh --force) works.

Comment 4 Kai Engert (:kaie) (inactive account) 2013-10-18 15:34:39 UTC
Created attachment 813827 [details]
patch

patch used for the test package

Comment 5 Kai Engert (:kaie) (inactive account) 2013-10-18 15:35:28 UTC
I recommend to fix this bug for rhel-7.0

Can you please grant devel_ack and qa_ack?

Comment 6 Kai Engert (:kaie) (inactive account) 2013-10-22 14:17:06 UTC
This should be fixed in ca-certificates-2013.1.94-70.1.el7

I saw the latest nightly RHEL 7 compose already contains that package.

What's next? MODIFIED or ON_QA?

Comment 11 Ludek Smid 2014-06-13 11:22:39 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


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