Package: stone
Version: 2.3.e-1.1
Severity: grave
Tags: patch
Justification: renders package unusable
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu lucid ubuntu-patch

With dash (or bash) as default shell stone is uninstallable.
This is due to the use of command expansion syntax to retrieve values 
stored in $DOMAINNAME and $HOSTNAME in postinst script.

This results in an uninstallable package with dash and invalid certficate with 
bash.

BTW, when the certicate already exists, the message to the user display the 
wrong path.

== HOW TO REPRODUCE ==
$ apt-get install stone

Fails with the following message
Setting up stone (2.3.e-1ubuntu1) ...
dpkg: error processing stone (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 stone
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install. Trying to recover:
Setting up stone (2.3.e-1ubuntu1) ...
You already have /etc/certs/stone.pem

== VERSION ==
Reproduced with
     stone | 2.3.e-1ubuntu1 | karmic/universe | source, amd64, i386
     stone | 2.3.e-1.1 | lucid/universe | source, amd64, i386


In Ubuntu, we've applied the attached patch to achieve the following:

  * debian/postinst: 
    - Fix incorrect use of command expansion which prevent 
    installation of the package with dash (LP: #495539)
    - Display the right path to the certificate when it already exists

We thought you might be interested in doing the same. 


-- System Information:
Debian Release: squeeze/sid
  APT prefers lucid-updates
  APT policy: (500, 'lucid-updates'), (500, 'lucid-security'), (500, 
'lucid-proposed'), (500, 'lucid-backports'), (500, 'lucid')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-9-generic (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff -u stone-2.3.e/debian/postinst stone-2.3.e/debian/postinst
--- stone-2.3.e/debian/postinst
+++ stone-2.3.e/debian/postinst
@@ -6,7 +6,7 @@
 PATH=$PATH:/usr/bin/ssl
 if [ -f stone.pem ]
 then
-    echo "You already have /etc/certs/stone.pem"
+    echo "You already have `pwd`/stone.pem"
 else
     HOSTNAME=`hostname -s`
     DOMAINNAME=`hostname -d`
@@ -14,10 +14,10 @@
 .
 .
 .
-$(DOMAINNAME)
-$(HOSTNAME)
+$DOMAINNAME
+$HOSTNAME
 stone
-r...@$(HOSTNAME).$(DOMAINNAME)
+r...@$hostname.$domainname
 +
 #    req -new -x509 -nodes -out stone.pem -keyout stone.pem
     ln -sf stone.pem `openssl x509 -noout -hash < stone.pem`.0
@@ -28 +28 @@
-#DEBHELPER#
\ No newline at end of file
+#DEBHELPER#
diff -u stone-2.3.e/debian/changelog stone-2.3.e/debian/changelog
diff -u stone-2.3.e/debian/control stone-2.3.e/debian/control
--- stone-2.3.e/debian/control
+++ stone-2.3.e/debian/control
@@ -1,7 +1,8 @@
 Source: stone
 Section: net
 Priority: optional
-Maintainer: Takuo KITAME <kit...@debian.org>
+Maintainer: Ubuntu Developers <ubuntu-devel-disc...@lists.ubuntu.com>
+XSBC-Original-Maintainer: Takuo KITAME <kit...@debian.org>
 Build-Depends: debhelper (>> 3.0.0), libssl-dev
 Standards-Version: 3.8.0
 

Reply via email to