Bug 133423 - Several errors in bind.spec
Several errors in bind.spec
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: bind (Show other bugs)
3.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jason Vas Dias
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-09-23 17:31 EDT by Tuomo Soini
Modified: 2014-01-21 17:49 EST (History)
0 users

See Also:
Fixed In Version: bind-9.2.4-2
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-10-18 17:05:27 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Triggers for safe upgrade from bind-9.2.4-EL3_10 to later version (961 bytes, patch)
2004-09-23 17:34 EDT, Tuomo Soini
no flags Details | Diff
Fix several minor problems in bind-9.2.4rc7-12_EL3 spec (3.43 KB, patch)
2004-09-23 17:37 EDT, Tuomo Soini
no flags Details | Diff

  None (edit)
Description Tuomo Soini 2004-09-23 17:31:42 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.3)
Gecko/20040805

Description of problem:
I tried to upgrade bind-9.2.4-EL3_10 to bind-9.2.4rc7-12_EL3 and found
out several errors from bind.spec.

bind-9.2.4-EL3_10 has %postun script which doesn't have required check
for upgrade and it will remove user and group named, and stop named
service, and run /sbin/chkconfig --del named resulting knowledge of
state of bind is lost and can't be restored automatically because
%postun script is run last, after 9.2.4rc7-12_EL3 is installed.

I added patch to add %triggerin and %triggerpostun to save previous
state of bind at beginning of upgrade and then restore it after
%postun script of 10:9.2.4-EL3_10 is run. patch is against
9.2.4rc7-12_EL3 bind.spec.

That patch makes it safe to upgrade automatically from 10:9.2.4-EL3_10
to later version.



Version-Release number of selected component (if applicable):
bind-9.2.4-EL3_10, bind-9.2.4rc7-12_EL3

How reproducible:
Always

Steps to Reproduce:
1. upgrade from bind-9.2.4-EL3_10 to bind-9.2.4rc7-12_EL3

    

Actual Results:  service named ist stopped.
knowledge about former named state is lost.

Additional info:
Comment 1 Tuomo Soini 2004-09-23 17:34:30 EDT
Created attachment 104225 [details]
Triggers for safe upgrade from bind-9.2.4-EL3_10 to later version

Patch add %triggerin -- bind = 10:9.2.4-EL3_10 to save former state of named
service and %triggerpostun -- bind = 10:9.2.4-EL3_10 to restore former state of
named.
Comment 2 Tuomo Soini 2004-09-23 17:37:59 EDT
Created attachment 104226 [details]
Fix several minor problems in bind-9.2.4rc7-12_EL3 spec

Some dirs were not labeled properly being %dir so rpm complined about 2 or more
instances of same file.

Hide service named condrestart output on several places.

Added version check to %triggerpostun -p bind-chroot. It's not necessary to run
this every time on bind-chroot upgrade.
Comment 3 Jason Vas Dias 2004-09-24 09:39:39 EDT
 The major problems caused by bind-9.2.4-EL3_10 were fixed in the
 latest bind release for RHEL-3: 20:bind-9.2.4-1_EL3 - this was not
 only lack of 'if [ "$1" -eq 0 ]' around bind's %postun, but more 
 disastrously around 'bind-chroot's %postun, which resulted in 
 configuration files being moved out of the chroot.
 bind-9.2.4-1_EL3 is baselined off the new ISC BIND 9.2.4 (final 
 release) . This will be in RHEL-3-U4 , and is now available from :
 http://people.redhat.com/~jvdias/bind/RHEL-3/
 Thanks for pointing out the other minor issues with the spec file -
 they will be fixed in the next release, but do not warrant a complete
 respin.
Comment 4 Tuomo Soini 2004-10-15 04:17:37 EDT
Hmmh. My patches had one minor problem I found when installed package
to new system.

several minor tweaks to bind.spec patch moves

/sbin/chkconfig --add named

to wrong place. It should move it only one line up, like:

%post
/sbin/chkconfig --add named
if [ $1 = 1 ]; then

is correct place, not %pre

Sorry, my bug :-)

Note You need to log in before you can comment on or make changes to this bug.