Bug 859687

Summary: Scriptlet syntax error in bind-chroot
Product: [Fedora] Fedora Reporter: Paul Howarth <paul>
Component: bindAssignee: Tomáš Hozza <thozza>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 17CC: atkac, bugzilla.redhat, thozza
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-10-22 08:56:17 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Paul Howarth 2012-09-23 09:00:31 UTC
Description of problem:
  Cleanup    : 32:bind-chroot-9.9.1-5.P2.fc17.x86_64                                                                                                      8/14 
Non-fatal POSTUN scriptlet failure in rpm package 32:bind-chroot-9.9.1-5.P2.fc17.x86_64
                                      9/14 
/var/tmp/rpm-tmp.maLf9i: line 7: syntax error near unexpected token `;;'
/var/tmp/rpm-tmp.maLf9i: line 7: `;;'
warning: %postun(bind-chroot-32:9.9.1-5.P2.fc17.x86_64) scriptlet failed, exit status 2


Version-Release number of selected component (if applicable):
9.9.1-5.P2.fc17, but still present in 9.9.1-9.P3.fc17

How reproducible:
Every time, just update to the latest build.

Additional info:
# rpm -q --scripts bind-chroot
postinstall scriptlet (using /bin/sh):
if [ "$1" -gt 0 ]; then
  [ -e /var/named/chroot/dev/random ] || \
    /bin/mknod /var/named/chroot/dev/random c 1 8
  [ -e /var/named/chroot/dev/zero ] || \
    /bin/mknod /var/named/chroot/dev/zero c 1 5
  [ -e /var/named/chroot/dev/null ] || \
    /bin/mknod /var/named/chroot/dev/null c 1 3
  rm -f /var/named/chroot/etc/localtime
  cp /etc/localtime /var/named/chroot/etc/localtime
  /bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi;
:;
preuninstall scriptlet (using /bin/sh):
if [ "$1" -eq 0 ]; then
  # Package removal, not upgrade
  /bin/systemctl --no-reload disable named-chroot.service > /dev/null 2>&1 || :
  /bin/systemctl --no-reload disable named-sdb-chroot.service > /dev/null 2>&1 || :
  /bin/systemctl stop named-chroot.service > /dev/null 2>&1 || :
  /bin/systemctl stop named-sdb-chroot.service > /dev/null 2>&1 || :
  rm -f /var/named/chroot/dev/{random,zero,null}
  rm -f /var/named/chroot/etc/localtime
fi
:;
postuninstall scriptlet (using /bin/sh):
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
if [ $1 -ge 1 ] ; then
  # Package upgrade, not uninstall
  /bin/systemctl try-restart named-chroot.service >/dev/null 2>&1 || :
  /bin/systemctl try-restart named-sdb-chroot.service >/dev/null 2>&1 || :
fi
;;
posttrans scriptlet (using /bin/sh):
if [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then
  [ -x /sbin/restorecon ] && /sbin/restorecon /var/named/chroot/dev/* > /dev/null 2>&1;
fi;
:;

The %postun script ends with ";;", whereas the other scripts end with ":;"

Comment 1 Dagan McGregor 2012-09-23 12:09:35 UTC
 I have noticed this error in F17 a few times, but only just bothered to check if a bug was logged for it. 

 Since this appears during the install or upgrade, I would have thought the build system would have picked up something like this.

Comment 2 Tomáš Hozza 2012-09-24 06:34:34 UTC
Thanks Paul.

The last line of %postun script should really be ":;" and not ";;".

Comment 3 Tomáš Hozza 2012-09-24 08:22:50 UTC
This issue has been fixed in bind-9.9.1-10.P3.fc17. 

You can wait for the next bind update in Fedora or find the fixed package here: https://koji.fedoraproject.org/koji/buildinfo?buildID=355898