Bug 110321 - upgrade from RH9 fails leaving both old and new rpm's for ntp
upgrade from RH9 fails leaving both old and new rpm's for ntp
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: ntp (Show other bugs)
1
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Harald Hoyer
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-11-18 09:14 EST by Mike
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-07-13 11:41:43 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
rpm -U -vv output when upgrade fails (52.31 KB, text/plain)
2003-11-19 18:58 EST, Bob Arendt
no flags Details
interpretation of rpm -vv output, postinstall scriptlet problem (3.20 KB, text/plain)
2003-11-19 19:00 EST, Bob Arendt
no flags Details

  None (edit)
Description Mike 2003-11-18 09:14:59 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1)
Gecko/20031030

Description of problem:

After upgrading from RH9 to Fedora I ended up with two ntp rpms.
rpm -qa | grep ntp-
ntp-4.1.2-5
ntp-4.1.2-0.rc1.2

=========  upgrade.log ================
Upgrading ntp-4.1.2-5.i386.
warning: /etc/ntp.conf created as /etc/ntp.conf.rpmnew
error: %post(ntp-4.1.2-5) scriptlet failed, exit status 1

I installed FC1 on Nov 8th.

-rw-r--r--    1 root     root         2875 Nov  8 20:20 
/etc/ntp.conf 
(in spite of the date, this is from the older version)

-rw-r--r--    1 root     root         2798 Oct 29 11:07 
/etc/ntp.conf.rpmnew
(in spite of the date, this is from the newer version)



Version-Release number of selected component (if applicable):


How reproducible:
Didn't try

Steps to Reproduce:
1. upgrade to FC1 from RH9 with a previous version of NTP
2.
3.
    

Actual Results:  As described above

Expected Results:  One version of NTP instead of two installed

Additional info:
Comment 1 Mike 2003-11-19 13:48:53 EST
Using these steps below I can duplicate the problem every time.  If 
the step below "vi ntp.conf" is skipped then the problem does not 
occur so it seems that if the ntp.conf is changed between revisions 
then the install gets hosed and the two versions are then retained. 
 
Regards,  Mike Klinke 
 
===================================================== 
16:28:35 # ll /etc/ntp* 
-rw-r--r--    1 root     root         2875 Nov 17 22:20 
/etc/ntp.conf.bak 
 
/etc/ntp: 
total 0 
 
16:28:47 # rpm -qa | grep ntp- 
 
16:29:18 # rpm -ivh 
/usr/src/redhat/RPMS/i386/ntp-4.1.2-0.rc1.2.i386.rpm 
Preparing...   ######################### [100%] 
   1:ntp       ######################### [100%] 
 
16:31:04 # vi ntp.conf (To change the file for the correct server) 
 
16:37:03 # up2date --nox -u ntp 
Fetching package list for channel: fedora-core-1... 
Fetching 
http://fedora.redhat.com/releases/fedora-core-1/headers/header.info... 
######################################## 
Fetching package list for channel: updates-released... 
Fetching 
http://fedora.redhat.com/updates/released/fedora-core-1/headers/header.info... 
######################################## 
Fetching Obsoletes list for channel: fedora-core-1... 
Fetching Obsoletes list for channel: updates-released... 
Fetching rpm headers... 
######################################## 
Name      Version        Rel 
---------------------------------------------------------- 
ntp       4.1.2          5          i386 
 
Testing package set / solving RPM inter-dependencies... 
######################################## 
ntp-4.1.2-5.i386.rpm: ################ Done. 
Preparing             ################ [100%] 
Installing... 
   1:ntp              ################ [100%] 
 
16:38:58 # ll ntp* 
-rw-r--r--    1 root     root         2808 Nov 19 16:38 ntp.conf 
-rw-r--r--    1 root     root         2875 Nov 17 22:20 ntp.conf.bak 
-rw-r--r--    1 root     root         2798 Oct 29 11:07 
ntp.conf.rpmnew 
 
ntp: 
total 8 
-rw-r--r--    1 ntp      ntp             4 Feb 13  2003 drift 
-rw-------    1 root     root          266 Oct 29 11:07 keys 
-rw-r--r--    1 root     root            0 Oct 29 11:07 step-tickers 
 
16:39:03 # rpm -qa | grep ntp- 
ntp-4.1.2-0.rc1.2 
ntp-4.1.2-5 
 
Comment 2 Bob Arendt 2003-11-19 18:58:47 EST
Created attachment 96073 [details]
rpm -U -vv output when upgrade fails
Comment 3 Bob Arendt 2003-11-19 19:00:36 EST
Created attachment 96074 [details]
interpretation of rpm -vv output, postinstall scriptlet problem

also posted to fedora-list
Comment 4 Harald Hoyer 2003-11-25 07:56:47 EST
doh :-/
added ":" at the end...
Thx all!
Comment 5 Charlie Brady 2005-08-19 17:37:34 EDT
This problem persists in RHEL4. See the %post script below, which will always
return non-zero of ntpd is not running - e.g. during a system upgrade. The
result is this in upgrade.log:

error: %post(ntp-4.2.0.a.20040617-4.i386) scriptlet failed, exit status 1

and a pair of ntp rpms installed.

/sbin/chkconfig --add ntpd

if [ "$1" -ge "1" ]; then
  grep /etc/ntp/drift /etc/ntp.conf > /dev/null 2>&1
  olddrift=$?
  if [ $olddrift -eq 0 ]; then
    service ntpd status > /dev/null 2>&1
    wasrunning=$?
    # let ntp save the actual drift
    [ $wasrunning -eq 0 ] && service ntpd stop > /dev/null 2>&1
    # copy the driftfile to the new location
    [ -f /etc/ntp/drift ] \
      && cp /etc/ntp/drift /var/lib/ntp/drift
    # change the path in the config file
    sed -e 's#/etc/ntp/drift#/var/lib/ntp/drift#g' \
      /etc/ntp.conf > /etc/ntp.conf.rpmupdate \
      && mv /etc/ntp.conf.rpmupdate /etc/ntp.conf
    # remove the temp file
    rm -f /etc/ntp.conf.rpmupdate
    # start ntp if it was running previously
    [ $wasrunning -eq 0 ] && service ntpd start > /dev/null 2>&1
  fi
fi

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