Bug 859687 - Scriptlet syntax error in bind-chroot
Scriptlet syntax error in bind-chroot
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: bind (Show other bugs)
17
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Tomas Hozza
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-23 05:00 EDT by Paul Howarth
Modified: 2012-10-22 04:56 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-10-22 04:56:17 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Paul Howarth 2012-09-23 05:00:31 EDT
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 08:09:35 EDT
 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 Tomas Hozza 2012-09-24 02:34:34 EDT
Thanks Paul.

The last line of %postun script should really be ":;" and not ";;".
Comment 3 Tomas Hozza 2012-09-24 04:22:50 EDT
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

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