From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4b) Gecko/20030521 Description of problem: Every time the cups is upgraded, this happens: # chkconfig --list cups service cups supports chkconfig, but is not referenced in any runlevel (run 'chkconfig --add cups') How reproducible: Always Expected Results: The rpm should check if cups is enabled and leave the setting alone.
The post-install script has: chkconfig --add cups || true and I think it's been there since the first CUPS package we shipped. How can I reproduce this problem, since I haven't seen it on any upgrade I've performed here?
Hmm. This has happened to me three times now on the same machine, so I thought it would be general. If you're saying it might be specific to that machine, things get more complicated. The machine in question used to be an 8.0, was upgraded to 9. Here is what I did in responce to your question: [root@kverulanten root]# cp -var /etc/cups /etc/cups.sav [root@kverulanten root]# rpm -q cups cups-1.1.17-13.3 [root@kverulanten root]# strace -v -f -o cupsstrace1 -s 256 rpm -Uhv cups-1.1.17-13.i386.rpm cups-libs-1.1.17-13.i386.rpm (processes attaching and detaching, long hang) ^C error: %postun(cups-1.1.17-13.3) scriptlet failed, exit status 0 ^C (no reaction) ^C^C^C (still no reaction) (other terminal) kill -9 [strace PID) Killed [root@kverulanten root]# rpm -q cups cups-1.1.17-13.3 cups-1.1.17-13 Oops, not very good. I thought --force was equivalent to --replacefiles --replacepackage and the rest of their gang. Better start all over. [root@kverulanten root]# rpm -e cups-1.1.17-13.3 [root@kverulanten root]# rpm -e cups-libs-1.1.17-13.3 [root@kverulanten root]# rpm -qa |grep cups cups-libs-1.1.17-13 cups-1.1.17-13 [root@kverulanten root]# cp -var /etc/cups.sav/* /etc/cups/ [root@kverulanten root]# chkconfig --list cups service cups supports chkconfig, but is not referenced in any runlevel (run 'chkconfig --add cups') [root@kverulanten root]# chkconfig --add cups [root@kverulanten root]# chkconfig --list cups cups 0:off 1:off 2:on 3:on 4:on 5:on 6:off OK, I guess now I can do the update. [root@kverulanten root]# strace -v -f -o cupsstrace2 -s 256 rpm -Uhv cups-1.1.17-13.3.i386.rpm cups-libs-1.1.17-13.3.i386.rpm (preparing, processes detaching and attaching, finishes without error) [root@kverulanten root]# chkconfig --list cups service cups supports chkconfig, but is not referenced in any runlevel (run 'chkconfig --add cups') Right. It did it again. [root@kverulanten root]# ls -l cupsstrace* -rw-r--r-- 1 root root 9223982 Jun 9 16:59 cupsstrace1 -rw-r--r-- 1 root root 9598399 Jun 9 17:11 cupsstrace2 Perhaps it's not a very good idea to create 20 MB of attachments here. Lemme look. /sbin/chkconfig is called left and right, but I don't really see what goes wrong. The last invocation of chkconfig is a --del though. [root@kverulanten root]# grep chkconfig cupsstrace2 4280 pread(4, "\0\0\0\0\1\0\0\0\320\20\0\0\270\0\0\0\317\20\0\0\1\0\346\17\0\7cy logic to things that already have\n start/stop priorities\n- fix silly display bug in --config\0- chkconfig: LSB support\0- alternatives: handle initscripts too; --initscript command-line option\n- chkconfig/ntsysv (and serviceconf"..., 4096, 17629184) = 4096 4280 pread(4, "\0\0\0\0\1\0\0\0\335\7\0\0\334\7\0\0B\6\0\0\1\0\346\17\0\7n/grep\0/bin/sed\0/bin/sh\0/bin/sh\0/bin/sh\0/bin/sh\0/bin/sh\0/etc/redhat-release\0/sbin/arping\0/sbin/chkconfig\0/sbin/fuser\0/sbin/ip\0/sbin/sysctl\0/usr/sbin/groupadd\0SysVinit\0bash\0config(initscripts)\0dev\0e2fsprogs\0fileutils\0gawk\0libc.so.6"..., 4096, 8245248) = 4096 4280 pread(4, "\0\0\0\0\1\0\0\0L\6\0\0K\6\0\0M\6\0\0\1\0\346\17\0\7DOMAIN is set\0- Make the random seed file mode 600.\0- bring down ppp devices if ifdown-ppp is called while ifup-ppp is sleeping.\0- moved to new chkconfig conventions\0- fixed rc.sysinit for hwclock compatibility\0- run \'ulimit -c 0\'"..., 4096, 6602752) = 4096 4280 pread(3, "\0\0\0\0\1\0\0\0\335\30\0\0\334\30\0\0\336\30\0\0\1\0\346\17\0\7\0\0\0@\0\0\0@\0\0@\0\0\0@\0\0\0@\0\0\0@\0\0\0@\0\0\0@\0\0\0@\0\0\0@\0\0\0@\0\0\0@\0\0\0@\0\0\0\0@\1\0\0J\1\0\0J\1\0\0J\0\0\0@/bin/sh\0/bin/sh\0/bin/sh\0/bin/sh\0/bin/sh\0/etc/rc.d/init.d\0/usr/sbin/alternatives\0chkconfig\0config(LPRng)\0fileutils\0gawk\0libc.so.6\0libc.so.6(GLIBC_2.0)\0libc.so."..., 4096, 26071040) = 4096 4280 pread(3, "\0\0\0\0\1\0\0\0\335\30\0\0\334\30\0\0\336\30\0\0\1\0\346\17\0\7\0\0\0@\0\0\0@\0\0@\0\0\0@\0\0\0@\0\0\0@\0\0\0@\0\0\0@\0\0\0@\0\0\0@\0\0\0@\0\0\0@\0\0\0@\0\0\0\0@\1\0\0J\1\0\0J\1\0\0J\0\0\0@/bin/sh\0/bin/sh\0/bin/sh\0/bin/sh\0/bin/sh\0/etc/rc.d/init.d\0/usr/sbin/alternatives\0chkconfig\0config(LPRng)\0fileutils\0gawk\0libc.so.6\0libc.so.6(GLIBC_2.0)\0libc.so."..., 4096, 26071040) = 4096 4280 write(19, "#!/bin/sh\n#\n# \"$Id: cups.sh,v 1.10 2000/03/30 05:19:16 mike Exp $\"\n#\n# Startup/shutdown script for the Common UNIX Printing System (CUPS).\n#\n# Linux chkconfig stuff:\n#\n# chkconfig: 2345 90 10\n# description: Startup/shutdown script for the Common UN"..., 2312) = 2312 4280 write(18, "/sbin/chkconfig --del cupsd 2>/dev/null || true # Make sure old versions aren\'t there anymore\n/sbin/chkconfig --add cups || true\n/usr/sbin/alternatives --install /usr/bin/lpr print /usr/bin/lpr.cups 40 \\\n\t --slave /usr/bin/lp print-lp /usr/bin/lp.cups \\\n\t "..., 1312) = 1312 4283 read(3, "/sbin/chkconfig --del cupsd 2>/dev/null || true # Make sure old versions aren\'t ", 80) = 80 4283 read(255, "/sbin/chkconfig --del cupsd 2>/dev/null || true # Make sure old versions aren\'t there anymore\n/sbin/chkconfig --add cups || true\n/usr/sbin/alternatives --install /usr/bin/lpr print /usr/bin/lpr.cups 40 \\\n\t --slave /usr/bin/lp print-lp /usr/bin/lp.cups \\\n\t "..., 1312) = 1312 4284 execve("/sbin/chkconfig", ["/sbin/chkconfig", "--del", "cupsd"], ["HOSTNAME=kverulanten.graenden.org", "SHELL=/bin/bash", "TERM=xterm", "HISTSIZE=1000", "SSH_CLIENT=192.168.1.1 2899 22", "QTDIR=/usr/lib/qt-3.1", "SSH_TTY=/dev/pts/0", "USER=root", "LS_COLORS=no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lz"..., "USERNAME=root", "PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin", "MAIL=/var/spool/mail/root", "_=/sbin/chkconfig", "PWD=/", "INPUTRC=/etc/inputrc", "LANG=en_US.iso88591", "SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass", "HOME=/root", "SHLVL=2", "BASH_ENV=/root/.bashrc", "LOGNAME=root", "SSH_CONNECTION=192.168.1.1 2899 192.168.1.8 22", "LESSOPEN=|/usr/bin/lesspipe.sh %s", "DISPLAY=localhost:10.0", "G_BROKEN_FILENAMES=1"]) = 0 4284 open("/usr/share/locale/en_US.iso88591/LC_MESSAGES/chkconfig.mo", O_RDONLY) = -1 ENOENT (No such file or directory) 4284 open("/usr/share/locale/en_US/LC_MESSAGES/chkconfig.mo", O_RDONLY) = -1 ENOENT (No such file or directory) 4284 open("/usr/share/locale/en.iso88591/LC_MESSAGES/chkconfig.mo", O_RDONLY) = -1 ENOENT (No such file or directory) 4284 open("/usr/share/locale/en/LC_MESSAGES/chkconfig.mo", O_RDONLY) = -1 ENOENT (No such file or directory) 4283 read(255, "/sbin/chkconfig --add cups || true\n/usr/sbin/alternatives --install /usr/bin/lpr print /usr/bin/lpr.cups 40 \\\n\t --slave /usr/bin/lp print-lp /usr/bin/lp.cups \\\n\t --slave /usr/bin/lpq print-lpq /usr/bin/lpq.cups \\\n\t --slave /usr/bin/lprm print-lprm /usr/bin"..., 1312) = 1218 4285 execve("/sbin/chkconfig", ["/sbin/chkconfig", "--add", "cups"], ["HOSTNAME=kverulanten.graenden.org", "SHELL=/bin/bash", "TERM=xterm", "HISTSIZE=1000", "SSH_CLIENT=192.168.1.1 2899 22", "QTDIR=/usr/lib/qt-3.1", "SSH_TTY=/dev/pts/0", "USER=root", "LS_COLORS=no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lz"..., "USERNAME=root", "PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin", "MAIL=/var/spool/mail/root", "PWD=/", "INPUTRC=/etc/inputrc", "LANG=en_US.iso88591", "SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass", "HOME=/root", "SHLVL=2", "BASH_ENV=/root/.bashrc", "LOGNAME=root", "SSH_CONNECTION=192.168.1.1 2899 192.168.1.8 22", "LESSOPEN=|/usr/bin/lesspipe.sh %s", "DISPLAY=localhost:10.0", "G_BROKEN_FILENAMES=1", "_=/sbin/chkconfig"]) = 0 4287 execve("/bin/sh", ["sh", "-c", "/sbin/chkconfig --add lpd"], ["HOSTNAME=kverulanten.graenden.org", "SHELL=/bin/bash", "TERM=xterm", "HISTSIZE=1000", "SSH_CLIENT=192.168.1.1 2899 22", "QTDIR=/usr/lib/qt-3.1", "SSH_TTY=/dev/pts/0", "USER=root", "LS_COLORS=no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lz"..., "USERNAME=root", "PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin", "MAIL=/var/spool/mail/root", "PWD=/", "INPUTRC=/etc/inputrc", "LANG=en_US.iso88591", "SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass", "HOME=/root", "SHLVL=2", "BASH_ENV=/root/.bashrc", "LOGNAME=root", "SSH_CONNECTION=192.168.1.1 2899 192.168.1.8 22", "LESSOPEN=|/usr/bin/lesspipe.sh %s", "DISPLAY=localhost:10.0", "G_BROKEN_FILENAMES=1", "_=/usr/sbin/alternatives"]) = 0 4287 execve("/sbin/chkconfig", ["/sbin/chkconfig", "--add", "lpd"], ["HOSTNAME=kverulanten.graenden.org", "TERM=xterm", "SHELL=/bin/bash", "HISTSIZE=1000", "SSH_CLIENT=192.168.1.1 2899 22", "QTDIR=/usr/lib/qt-3.1", "SSH_TTY=/dev/pts/0", "USER=root", "LS_COLORS=no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lz"..., "USERNAME=root", "MAIL=/var/spool/mail/root", "PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin", "_=/sbin/chkconfig", "INPUTRC=/etc/inputrc", "PWD=/", "LANG=en_US.iso88591", "SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass", "SHLVL=3", "HOME=/root", "BASH_ENV=/root/.bashrc", "LOGNAME=root", "SSH_CONNECTION=192.168.1.1 2899 192.168.1.8 22", "LESSOPEN=|/usr/bin/lesspipe.sh %s", "DISPLAY=localhost:10.0", "G_BROKEN_FILENAMES=1"]) = 0 4288 execve("/bin/sh", ["sh", "-c", "/sbin/chkconfig --del cups"], ["HOSTNAME=kverulanten.graenden.org", "SHELL=/bin/bash", "TERM=xterm", "HISTSIZE=1000", "SSH_CLIENT=192.168.1.1 2899 22", "QTDIR=/usr/lib/qt-3.1", "SSH_TTY=/dev/pts/0", "USER=root", "LS_COLORS=no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lz"..., "USERNAME=root", "PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin", "MAIL=/var/spool/mail/root", "PWD=/", "INPUTRC=/etc/inputrc", "LANG=en_US.iso88591", "SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass", "HOME=/root", "SHLVL=2", "BASH_ENV=/root/.bashrc", "LOGNAME=root", "SSH_CONNECTION=192.168.1.1 2899 192.168.1.8 22", "LESSOPEN=|/usr/bin/lesspipe.sh %s", "DISPLAY=localhost:10.0", "G_BROKEN_FILENAMES=1", "_=/usr/sbin/alternatives"]) = 0 4288 execve("/sbin/chkconfig", ["/sbin/chkconfig", "--del", "cups"], ["HOSTNAME=kverulanten.graenden.org", "TERM=xterm", "SHELL=/bin/bash", "HISTSIZE=1000", "SSH_CLIENT=192.168.1.1 2899 22", "QTDIR=/usr/lib/qt-3.1", "SSH_TTY=/dev/pts/0", "USER=root", "LS_COLORS=no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lz"..., "USERNAME=root", "MAIL=/var/spool/mail/root", "PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin", "_=/sbin/chkconfig", "INPUTRC=/etc/inputrc", "PWD=/", "LANG=en_US.iso88591", "SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass", "SHLVL=3", "HOME=/root", "BASH_ENV=/root/.bashrc", "LOGNAME=root", "SSH_CONNECTION=192.168.1.1 2899 192.168.1.8 22", "LESSOPEN=|/usr/bin/lesspipe.sh %s", "DISPLAY=localhost:10.0", "G_BROKEN_FILENAMES=1"]) = 0 4280 write(6, "if [ \"$1\" = \"0\" ]; then\n\t/sbin/service cups stop > /dev/null 2>&1\n\t/sbin/chkconfig --del cups\n /usr/sbin/alternatives --remove print /usr/bin/lpr.cups\nfi\nexit 0", 167) = 167 4292 read(255, "if [ \"$1\" = \"0\" ]; then\n\t/sbin/service cups stop > /dev/null 2>&1\n\t/sbin/chkconfig --del cups\n /usr/sbin/alternatives --remove print /usr/bin/lpr.cups\nfi\nexit 0", 167) = 167 4297 read(255, "#!/bin/sh\n#\n# \"$Id: cups.sh,v 1.10 2000/03/30 05:19:16 mike Exp $\"\n#\n# Startup/shutdown script for the Common UNIX Printing System (CUPS).\n#\n# Linux chkconfig stuff:\n#\n# chkconfig: 2345 90 10\n# description: Startup/shutdown script for the Common UN"..., 2312) = 2312 I put both strace outputs at http://www.provocation.net/tmp/cupsstrace1 and http://www.provocation.net/tmp/cupsstrace2 . Please let me know when you've grabbed them so I can remove them.
chkconfig --del cups only happens when, after the package removal, there are no instances of cups left. So on upgrade, this happens: [original cups package is installed] new cups package is unpacked onto filesystem new cups package post scriptlet runs (chkconfig --add cups) original cups preun scriptlt runs (and does nothing, since $1 == 1) So it looks to me like your RPM database is confused. You could force-remove all cups packages, then install the latest ones, and see if the problem doesn't go away.
I've had this problem with cups since day 1, so I doubt it's the rpm database. But that's easy to test: [root@kverulanten root]# rpm -e cups warning: /etc/cups/printers.conf saved as /etc/cups/printers.conf.rpmsave [root@kverulanten root]# rpm -e --nodeps cups-libs [root@kverulanten root]# rpm --rebuilddb > You could force-remove all cups packages, then install the latest ones, > and see if the problem doesn't go away. The problem occurs when upgrading, so installing the latest packages would bypass it, not solve it. Besides, if all I was trying to do was to get my cups working, a simple "chkconfig --add cups" would be sufficient. I filed a bug report to help you figure what goes wrong in the upgrade procedure and why, not to get my cups working. If you're interested, here is what happens: I have now no cups installed and the rpm database has just been rebuilt. [root@kverulanten root]# rpm -hiv cups-1.1.17-13.i386.rpm cups-libs-1.1.17-13.i386.rpm Preparing... ########################################### [100%] 1:cups-libs ########################################### [ 50%] 2:cups ########################################### [100%] [root@kverulanten root]# chkconfig --list cups service cups supports chkconfig, but is not referenced in any runlevel (run 'chkconfig --add cups') [root@kverulanten root]# chkconfig --add cups [root@kverulanten root]# chkconfig --list cups cups 0:off 1:off 2:on 3:on 4:on 5:on 6:off Cups was not automatically turned on, which is correct behaviour according to installation policies; network services must not be turned on by default. Having turned cups on manually, it's now time for the update. [root@kverulanten root]# cp -arf /etc/cups.sav /etc/cups [root@kverulanten root]# service cups start Starting cups: [ OK ] [root@kverulanten root]# rpm -Uhv cups-1.1.17-13.3.i386.rpm cups-libs-1.1.17-13.3.i386.rpm Preparing... ########################################### [100%] 1:cups-libs ########################################### [ 50%] 2:cups ########################################### [100%] [root@kverulanten root]# chkconfig --list cups service cups supports chkconfig, but is not referenced in any runlevel (run 'chkconfig --add cups') If you now say that my rpm database is confused, you would be suggesting that there is a bug in rpm. Personally I don't think anything is wrong with rpm. Something is wrong with the cups %post and those strace outputs should help you figure it. Having proven your assumption on the cause of this wrong, I am re-opening the bug.
It looks like you forgot to run 'redhat-switch-printer' to set CUPS to be the preferred spooler.