Bug 133423 - Several errors in bind.spec
Summary: Several errors in bind.spec
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: bind
Version: 3.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jason Vas Dias
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-09-23 21:31 UTC by Tuomo Soini
Modified: 2014-01-21 22:49 UTC (History)
0 users

Fixed In Version: bind-9.2.4-2
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-10-18 21:05:27 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Triggers for safe upgrade from bind-9.2.4-EL3_10 to later version (961 bytes, patch)
2004-09-23 21:34 UTC, 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 21:37 UTC, Tuomo Soini
no flags Details | Diff

Description Tuomo Soini 2004-09-23 21:31:42 UTC
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 21:34:30 UTC
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 21:37:59 UTC
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 13:39:39 UTC
 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 08:17:37 UTC
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.