Red Hat Bugzilla – Full Text Bug Listing
|Summary:||use of %pretrans cannot possibly work|
|Product:||[Fedora] Fedora||Reporter:||Jeremy Katz <katzj>|
|Component:||rsyslog||Assignee:||Peter Vrabec <pvrabec>|
|Status:||CLOSED RAWHIDE||QA Contact:||Fedora Extras Quality Assurance <extras-qa>|
|Fixed In Version:||Doc Type:||Bug Fix|
|Doc Text:||Story Points:||---|
|Last Closed:||2007-07-25 10:30:04 EDT||Type:||---|
|oVirt Team:||---||RHEL 7.3 requirements from Atomic Host:|
|Bug Depends On:|
Description Jeremy Katz 2007-07-23 13:32:14 EDT
When doing a new install, the use of bash for %pretrans cannot in any way possibly work. It'll get run before bash is installed.
Comment 1 Jeremy Katz 2007-07-23 13:33:07 EDT
The simple thing to do here is to just listen to all the comments about using the same named files :-)
Comment 2 Peter Vrabec 2007-07-24 06:09:39 EDT
Is there any way how can we skip this section during new install? I see there is also problem with %post section, isn't it? # mv /bin/bash /bin/bash.backup # rpm -U --force rsyslog-1.17.0-2.fc8.x86_64.rpm error: %unknownscript(rsyslog-1.17.0-2.fc8.x86_64) scriptlet failed, exit status 255 error: %post(rsyslog-1.17.0-2.fc8.x86_64) scriptlet failed, exit status 255 # echo $? 1 I really don't like the idea of renaming rsyslog files to sysklogd files.
Comment 3 Steve Grubb 2007-07-24 09:19:25 EDT
Why can't it use either rsyslogd.conf or syslogd.conf? The daemon has a "-f" option that the file name can be passed on. The init script can figure out which file to use and we can skip all the extra work in the spec file.
Comment 4 Peter Vrabec 2007-07-24 09:42:29 EDT
so the scenario will be: init script use syslog.conf.rpmsave or sysconfig/syslog.rpmsave if they exists, otherwise it use rsyslog.conf and sysconfig/rsyslog right? And init scipt can print warning that the old config files are being used.
Comment 5 Steve Grubb 2007-07-24 10:15:22 EDT
well, I'd go so far as to rename the save files so they don't get cleaned up as orphaned files. %ghost can be used to indicate that the package will own the syslog.conf file. I'd suggest something like: 1) if neither syslog.conf or syslog.conf.rpmsave exist, "-f" option is not needed so it uses rsyslog.conf. 2) if syslog.conf doesn't exist and syslog.conf.rpmsave exists, rename it to syslog.conf. In either case, use syslog.conf via "-f" option.. The daemon can simply log which config file its using if the "-f" option is used, no need to write anything to the screen. I also wonder if we can compare the config files and suggest deleting the syslog.conf files if they match rsyslog's or were the default syslog.conf files.
Comment 6 Peter Vrabec 2007-07-24 12:19:13 EDT
I have removed %pretrans section, and moved hadling with sysklogd config files to %post. ... if [ -f /etc/syslog.conf ]; then mv -f /etc/rsyslog.conf /etc/rsyslog.conf.rpmnew mv -f /etc/syslog.conf /etc/rsyslog.conf fi if [ -f /etc/sysconfig/syslog ]; then mv -f /etc/sysconfig/rsyslog /etc/sysconfig/rsyslog.rpmnew mv -f /etc/sysconfig/syslog /etc/sysconfig/rsyslog fi ... Can we give one more chance to this solution. Before we start dealing with two config files for one daemon. Change is in cvs(rsyslog-1.17.2-3.fc8), but I can build it, something with koji.
Comment 7 Peter Vrabec 2007-07-25 10:30:04 EDT
rsyslog-1.17.2-3.fc8 was built