Hide Forgot
Description of problem: I am Using CentOS-7.2.1511 version and installing one of my custom software as an rpm bundle. Everything went fine. No Issue. The RPM bundle as post installation scripts which restarts my custom service. During the upgrade of my software I am seeing an issue with my post installation scripts. It actually restarting my service , however throwing a message as mentioned below. It is the verbose of my rpm --install command. D: %post(videonet-edge-centos-8.0.107-1.noarch): scriptlet start D: %post(videonet-edge-centos-8.0.107-1.noarch): execv(/bin/sh) pid 8031 + set -e + echo 'System restarting' + sudo /usr/bin/systemctl restart vne D: %post(videonet-edge-centos-8.0.107-1.noarch): waitpid(8031) rc 8031 status f warning: %post(qumu-videonet-edge-centos-8.0.107-1.noarch) scriptlet failed, signal 15 Version-Release number of selected component (if applicable): CentOS-7.2.1511 How reproducible: Steps to Reproduce: 1. Install custom rpm package first (say custompackage.rpm) 2. make sure custompackage.rpm has post installation script which restrats custom service 3. upgrade the previously installed software in the CentOS machine with custompackage.rpm Actual results: The post installation scripts is terminated with status f. However the service is getting restarted. Expected results: The post installation script should be executed without any issues and should not throw any warnings or errors Additional info:
This is a problem of your postinstall scriptlet, it should not be failing at the first place (Why do you use sudo when the package update is done by root?) and the service restart is being done by systemd. yum is only executing the respective commands and reporting the resulting exit code. IMHO this is not a bug and should be closed.
Hi Karel Thanks for your response. I have tried without sudo also as a first step, however it was failing. So tried this approach. Really not sure why it is complaining. In the process of restarting, I am trying to stop my java service. What I found is that it is giving status code as 143, so I have handled it as successexitcode, but still no use. My further steps in the scripts are not being executed. I am attaching my service file here. Regards Veeru
Created attachment 1216426 [details] service file Please find my service attached here.
Hi All, Did you get a chance to check my comments? Your early response is very much appreciated.
This is not a bug in yum. This is a problem with package scriptlet that should be fixed in the spec file or somewhere else in the package.