Description of problem: When attempting to uninstall the munin-node or munin-cgi rpm packages, it fails with an error in the PRERUN scriptlet. Version-Release number of selected component: munin-cgi-2.0.9-3.el6.noarch munin-node-2.0.9-3.el6.noarch How reproducible: Consistent Steps to Reproduce: 1. yum install munin-cgi munin-node 2. yum remove munin-cgi munin-node 3. rpm --erase munin-cgi munin-node Actual results: Downloading Packages: Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Error in PREUN scriptlet in rpm package munin-cgi Error in PREUN scriptlet in rpm package munin-node munin-node-2.0.9-3.el6.noarch was supposed to be removed but is not! Verifying : munin-node-2.0.9-3.el6.noarch 1/2 munin-cgi-2.0.9-3.el6.noarch was supposed to be removed but is not! Verifying : munin-cgi-2.0.9-3.el6.noarch 2/2 Failed: munin-cgi.noarch 0:2.0.9-3.el6 munin-node.noarch 0:2.0.9-3.el6 error reading information on service munin-fcgi-html: No such file or directory error reading information on service munin-fcgi-graph: No such file or directory error: %preun(munin-cgi-2.0.9-3.el6.noarch) scriptlet failed, exit status 1 error reading information on service munin-asyncd: No such file or directory error reading information on service munin-fcgi-html: No such file or directory error reading information on service munin-fcgi-graph: No such file or directory error: %preun(munin-node-2.0.9-3.el6.noarch) scriptlet failed, exit status 1 Expected results: The packages are successfully uninstalled. Additional info: Packages are in the epel repo. A workaround is to use "rpm --erase --nopreun munin-cgi munin-node", but I don't know how safe that is.
The bug is assigned to F17, but your versions above indicate EL6. Which do you have? Additionally, you should have a newer version available regardless. % bodhi -L munin dist-6E-epel-testing-candidate munin-2.0.9-4.el6 dist-6E-epel-testing munin-2.0.10-1.el6 dist-6E-epel munin-2.0.9-3.el6 f17-updates-candidate munin-2.0.9-4.fc17 f17-updates-testing munin-2.0.10-1.fc17 f17-updates munin-2.0.10-1.fc17 % rpm -q --changelog munin | head * Wed Jan 09 2013 D. Johnson <fenris02> - 2.0.10-1 - Update to 2.0.10 - BZ# 891940,892377 Only stop/restart services provided by sub-package, not deps. - BZ# 881689 Fix config file so that it no longer references the build host - BZ# 877116 Patch using '&' in the URLs instead of '&' in HTMLConfig * Fri Dec 21 2012 D. Johnson <fenris02> - 2.0.9-4 - Use Makefile.config-dist instead of sed. - BZ# 890246,890247 "su" directive is not used in epel5/6 logrotate Update it with: # su -c 'yum update --enablerepo=updates-testing munin-2.0.10-1.fc17' as soon as you are able to. If you have EL6, use "epel-testing" instead of "updates-testing" above.
Sorry, I am running CentOS 6.3 64 bit. The bug is in a package from the EPEL repository. If this is the wrong place to report this bug, could you point me in the right direction? If this is the correct place to report an EPEL package bug, what version should I select in the bug header? # uname -a Linux server.example.com 2.6.32-279.19.1.el6.x86_64 #1 SMP Wed Dec 19 07:05:20 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux # tail /etc/*release* ==> /etc/centos-release <== CentOS release 6.3 (Final) ==> /etc/redhat-release <== CentOS release 6.3 (Final) ==> /etc/system-release <== CentOS release 6.3 (Final) ==> /etc/system-release-cpe <== cpe:/o:centos:linux:6:GA For your second question: Oof, I completely forgot to try the packages in epel-testing. As can be seen below, I tried the newer version, and have the same errors. # yum reinstall --enablerepo=epel-testing munin-node munin-cgi # rpm -qa | grep munin munin-common-2.0.10-1.el6.noarch munin-node-2.0.10-1.el6.noarch munin-cgi-2.0.10-1.el6.noarch munin-2.0.10-1.el6.noarch # yum remove munin-cgi munin-node Downloading Packages: Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Error in PREUN scriptlet in rpm package munin-node Error in PREUN scriptlet in rpm package munin-cgi munin-cgi-2.0.10-1.el6.noarch was supposed to be removed but is not! Verifying : munin-cgi-2.0.10-1.el6.noarch 1/2 munin-node-2.0.10-1.el6.noarch was supposed to be removed but is not! Verifying : munin-node-2.0.10-1.el6.noarch 2/2 Failed: munin-cgi.noarch 0:2.0.10-1.el6 munin-node.noarch 0:2.0.10-1.el6 # rpm --erase munin-cgi munin-node error reading information on service munin-asyncd: No such file or directory error reading information on service munin-fcgi-html: No such file or directory error reading information on service munin-fcgi-graph: No such file or directory error: %preun(munin-node-2.0.10-1.el6.noarch) scriptlet failed, exit status 1 error reading information on service munin-fcgi-html: No such file or directory error reading information on service munin-fcgi-graph: No such file or directory error: %preun(munin-cgi-2.0.10-1.el6.noarch) scriptlet failed, exit status 1
You said: A workaround is to use "rpm --erase --nopreun munin-cgi munin-node", but I don't know how safe that is. That will work, as would --noscripts. Then you can easily install 2.0.10 and it should remove safely and cleanly. The two bugs that prevent it from removing cleanly are BZ# 891940, and BZ# 892377 (one is fedora, other is epel). This issue should be resolved in .10 (Corrected EPEL-6 assignment to match)
I tried uninstalling with --nopreun, which succeeded, then installing from epel-testing, then uninstalling normally, but the problem still occurred. I then tried running a live CD, and installed the 2.0.10 version from epel-testing (first time installing Munin on the live boot), but the problem still occurred during uninstall. I do not think the bug has been fixed in 2.0.10. On the live CD: [root@livecd ~]# yum install --enablerepo=epel-testing munin-node munin-cgi ... Installing: munin-cgi noarch 2.0.10-1.el6 epel-testing 25 k munin-node noarch 2.0.10-1.el6 epel-testing 401 k ... [root@livecd ~]# rpm -qa | grep munin munin-cgi-2.0.10-1.el6.noarch munin-node-2.0.10-1.el6.noarch munin-2.0.10-1.el6.noarch munin-common-2.0.10-1.el6.noarch [root@livecd ~]# yum remove munin-cgi munin-node Loaded plugins: fastestmirror, refresh-packagekit, security Setting up Remove Process Resolving Dependencies --> Running transaction check ---> Package munin-cgi.noarch 0:2.0.10-1.el6 will be erased ---> Package munin-node.noarch 0:2.0.10-1.el6 will be erased --> Processing Dependency: perl(Munin::Node::Config) for package: munin-2.0.10-1.el6.noarch --> Processing Dependency: perl(Munin::Node::ProxySpooler) for package: munin-2.0.10-1.el6.noarch --> Running transaction check ---> Package munin.noarch 0:2.0.10-1.el6 will be erased --> Finished Dependency Resolution Dependencies Resolved ============================================================ Package Arch Version Repository Size ============================================================ Removing: munin-cgi noarch 2.0.10-1.el6 @epel-testing 20 k munin-node noarch 2.0.10-1.el6 @epel-testing 1.3 M Removing for dependencies: munin noarch 2.0.10-1.el6 @epel-testing 515 k Transaction Summary ============================================================ Remove 3 Package(s) Installed size: 1.8 M Is this ok [y/N]: y Downloading Packages: Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Error in PREUN scriptlet in rpm package munin-cgi Erasing : munin-2.0.10-1.el6.noarch1/3 error reading information on service munin-fcgi-html: No such file or directory error reading information on service munin-fcgi-graph: No such file or directory error: %preun(munin-cgi-2.0.10-1.el6.noarch) scriptlet failed, exit status 1 Error in PREUN scriptlet in rpm package munin-node munin-cgi-2.0.10-1.el6.noarch was supposed to be removed but is not! Verifying : munin-cgi-2.0.10-1.el6.noarch 1/3 munin-node-2.0.10-1.el6.noarch was supposed to be removed but is not! Verifying : munin-node-2.0.10-1.el6.noarch 2/3 Verifying : munin-2.0.10-1.el6.noarch 3/3 Dependency Removed: munin.noarch 0:2.0.10-1.el6 Failed: munin-cgi.noarch 0:2.0.10-1.el6 munin-node.noarch 0:2.0.10-1.el6 Complete! [root@livecd ~]# rpm --erase munin-cgi munin-node error reading information on service munin-asyncd: No such file or directory error reading information on service munin-fcgi-html: No such file or directory error reading information on service munin-fcgi-graph: No such file or directory error: %preun(munin-node-2.0.10-1.el6.noarch) scriptlet failed, exit status 1 error reading information on service munin-fcgi-html: No such file or directory error reading information on service munin-fcgi-graph: No such file or directory error: %preun(munin-cgi-2.0.10-1.el6.noarch) scriptlet failed, exit status 1
Created attachment 730945 [details] fix %preun cgi for el6 This seems to be partially fixed in http://pkgs.fedoraproject.org/cgit/munin.git/commit/munin.spec?id=3b63d51e1af1f740db656b7eaa2b7be07cf83905 (2.0.12-2) However, munin-cgi is still buggy. [root@test1 ~]# rpm -vve munin-cgi (snip) D: erase: %preun(munin-cgi-2.0.12-2.el6.noarch) scriptlet start D: erase: %preun(munin-cgi-2.0.12-2.el6.noarch) execv(/bin/sh) pid 27124 + '[' 0 = 0 ']' + for svc in fcgi-html fcgi-graph + service munin-fcgi-html stop + : + /sbin/chkconfig --del munin-fcgi-html error reading information on service munin-fcgi-html: No such file or directory + for svc in fcgi-html fcgi-graph + service munin-fcgi-graph stop + : + /sbin/chkconfig --del munin-fcgi-graph error reading information on service munin-fcgi-graph: No such file or directory D: erase: waitpid(27124) rc 27124 status 100 secs 0.057 error: %preun(munin-cgi-2.0.12-2.el6.noarch) scriptlet failed, exit status 1 (snip) However, no such services are installed (or are necessary, apache autocreates the fcgi munin-cgi-html and munin-cgi-graph processes). Suggested patch attached.
Good call out, but epel5/6 should likely have initscripts for those to so that it matches newer releases. The others have: ExecStart=/usr/bin/spawn-fcgi -s /run/munin/fcgi-graph.sock -U apache -u munin -g munin /var/www/cgi-bin/munin-cgi-graph -P /run/munin/fcgi-graph.pid ExecStart=/usr/bin/spawn-fcgi -s /run/munin/fcgi-html.sock -U apache -u munin -g munin /var/www/cgi-bin/munin-cgi-html -P /run/munin/fcgi-html.pid which match the two services in question.
(In reply to comment #6) > Good call out, but epel5/6 should likely have initscripts for those to so > that it matches newer releases. > > The others have: > > ExecStart=/usr/bin/spawn-fcgi -s /run/munin/fcgi-graph.sock -U apache -u > munin -g munin /var/www/cgi-bin/munin-cgi-graph -P /run/munin/fcgi-graph.pid > > ExecStart=/usr/bin/spawn-fcgi -s /run/munin/fcgi-html.sock -U apache -u > munin -g munin /var/www/cgi-bin/munin-cgi-html -P /run/munin/fcgi-html.pid > > which match the two services in question. Hmm. Those services are not needed or used with apache. And since the munin-cgi package seems to deal with apache (package httpd) only, and especially mod_fcgid which only uses dynamic fcgi servers (review the documentation at http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html), I don't really see the point of them. I would suggest to get rid of them and the spawn-fcgi require. I can make a patch later. If the package is supposed to support lighttpd and nginx too, then it should not require apache (via mod_fcgid) and maybe at least have documentation on how to get munin working with those servers, and preferably working out-of-the-box configuration - like it is with apache. Thinking further, the best solution would probably be multiple "cgi" packages, the current for apache (with the above change) and separate cgi packages for lighttpd (which also can use dynamic fcgi processes) and nginx (which requires external processes with spawn-fcgi). I can provide a patch for a separate lighttpd munin-cgi package later. Anyway, perhaps these separate packages should be discussed in another bug, and just leave this bug for the immediate preun scriptlet problems?
You realize you do not need munin-cgi just to have zooming graphics right? Munin-cgi subpackage is purely for running under fcgi. The config file I'm providing does use apache.
(In reply to comment #8) > You realize you do not need munin-cgi just to have zooming graphics right? Sure. > Munin-cgi subpackage is purely for running under fcgi. The config file I'm > providing does use apache. Please read my previous comment #7 more carefully. Apache does not use the external fcgi processes spawned with spawn-fcgi, they are unnecessary, and should be removed.
Created attachment 731280 [details] remove unnecessary and unused fcgi service processes from spec file Here's the patch to remove the fcgi services from the spec file. Obviously it also fixes the preun scriptlet fails...
Created attachment 738273 [details] Separate cgi package for nginx Here's a suggestion for a separate cgi package for nginx, even though it's not really related to this bug (oh and I can still create a separate cgi package for lighttpd if there is interest...). I've tested this on Fedora 18 and el6. Obviously this also fixes the uninstall issues.
The patch was included in 2.0.12-4, and munin-nginx 2.0.19-1 should resolve this.