On Mon, Jun 07, 2010 at 11:14:14AM +0200, Holger Levsen wrote:
> during a test with piuparts I noticed your package failed to install. 
> 
> From the attached log (scroll to the bottom...):
> 
>   Setting up libcipux-cat-web-perl (3.4.0.2-1) ...
>   chmod: cannot access `/etc/cipux-cat-web/cipux-cat-web.conf': No such file 
> or directory
>   dpkg: error processing libcipux-cat-web-perl (--configure):
>    subprocess installed post-installation script returned error exit status 1
>   Errors were encountered while processing:
>    libcipux-cat-web-perl
>   E: Sub-process /usr/bin/dpkg returned an error code (1)

I've just prepared the attached patch. It seems there is not
configuration in /etc anymore but it's possible for the admin to have
one. Thus simply testing for the file and only chmod'ing it if existent.

I didn't see this fixed in your git repository and thus uploaded it to
DELAYED/5. If you want me to push the changes to collab-maint, please
say so.

Hope you're fine with the patch.
Hauke

-- 
 .''`.   Jan Hauke Rahm <[email protected]>               www.jhr-online.de
: :'  :  Debian Developer                                 www.debian.org
`. `'`   Member of the Linux Foundation                    www.linux.com
  `-     Fellow of the Free Software Foundation Europe      www.fsfe.org
From 032981be51307145c4489393d326bf9096f90251 Mon Sep 17 00:00:00 2001
From: Jan Hauke Rahm <[email protected]>
Date: Wed, 16 Jun 2010 11:46:52 +0200
Subject: [PATCH] Non-maintainer upload.

* Non-maintainer upload.
* Don't act on non-existent files; fixes installation failure (Closes:
  #584875)
---
 debian/changelog |    8 ++++++++
 debian/postinst  |    5 ++++-
 debian/rules     |    5 -----
 3 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index c07b874..0ceaf99 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+cipux-cat-web (3.4.0.2-2.1) UNRELEASED; urgency=low
+
+  * Non-maintainer upload.
+  * Don't act on non-existent files; fixes installation failure (Closes:
+    #584875)
+
+ -- Jan Hauke Rahm <[email protected]>  Wed, 16 Jun 2010 11:45:31 +0200
+
 cipux-cat-web (3.4.0.2-2) unstable; urgency=low
 
   * Fix include config defaults.
diff --git a/debian/postinst b/debian/postinst
index 19ff8c7..433842e 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -15,7 +15,10 @@ case "$1" in
 		mkdir -p /etc/cipux-cat-web
 	fi
 	chmod 750 /etc/cipux-cat-web
-	chmod 640 /etc/cipux-cat-web/cipux-cat-web.conf
+	# Admins may have copied this file from /usr/share/...
+	# Correcting permissions if existent
+	[ -f /etc/cipux-cat-web/cipux-cat-web.conf ] && \
+		chmod 640 /etc/cipux-cat-web/cipux-cat-web.conf
 	chown -R www-data:www-data /etc/cipux-cat-web
 	;;
     abort-upgrade|abort-remove|abort-deconfigure)
diff --git a/debian/rules b/debian/rules
index d2d98ab..94756e7 100755
--- a/debian/rules
+++ b/debian/rules
@@ -69,11 +69,6 @@ binary-post-install/cipux-cat-web::
 		-name web -not -name dpkg-daemon-helper \
 		-exec mv -t debian/$(cdbs_curpkg)/usr/share/cipux-cat-web/web '{}' ';'
 
-# Override upstream default: secure connection is unneeded to localhost
-binary-fixup/libcipux-cat-web-perl::
-	perl -i -pe "s|^(\h*catweb_rpc_server\h*=>\h*).*,\h*(#.*)?\$$|\$$1'http://localhost:8001/RPC2',|" \
-		debian/$(cdbs_curpkg)/etc/cipux-cat-web/cipux-cat-web.conf
-
 # Ensure debconf PO files is in sync with templates
 clean::
 	debconf-updatepo
-- 
1.7.1

Attachment: signature.asc
Description: Digital signature

Reply via email to