Hide Forgot
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:
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.
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.
Created attachment 813827 [details] patch patch used for the test package
I recommend to fix this bug for rhel-7.0 Can you please grant devel_ack and qa_ack?
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?
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.