Bug#694417: bbdb: package installation creates /root/.gnupg/*

2012-11-27 Thread Sébastien Villemot
Control: tags -1 + patch

Dear Maintainers,

Andreas Beckmann deb...@abeckmann.de writes:

 Package: bbdb
 Version: 2.36-2
 Severity: serious
 User: debian...@lists.debian.org
 Usertags: piuparts

 during a test with piuparts I noticed that your package creates files in
 /root. From the attached log (scroll to the bottom):

 1m4.7s ERROR: FAIL: Package purging left files on system:
   /root/.gnupg/not owned
   /root/.gnupg/gpg.confnot owned
   /root/.gnupg/pubring.gpg not owned
   /root/.gnupg/secring.gpg not owned

Please find attached a patch that fixes this bug. I can perform the NMU
if you are busy now, but I would appreciate your feedback on the patch.

Regards,
diff -Nru bbdb-2.36/debian/bbdb.emacsen-install bbdb-2.36/debian/bbdb.emacsen-install
--- bbdb-2.36/debian/bbdb.emacsen-install	2010-12-12 16:03:00.0 +0100
+++ bbdb-2.36/debian/bbdb.emacsen-install	2012-11-27 14:53:21.0 +0100
@@ -74,6 +74,11 @@
 
 	# at ELCDIR
 	( cd ${ELCDIR}
+
+	# Prevent epg from manipulating /root/.gnupg (#694417)
+	TMPGNUPGHOME=`mktemp -d --tmpdir gnupg.XX`
+	export GNUPGHOME=${TMPGNUPGHOME}
+
 	echo Generating bbdb-autoloads...
 echo Generating bbdb-autoloads  $LOG
 	make autoloads  $LOG 21
@@ -86,7 +91,7 @@
 		GNUSDIR=${GNUSDIR} \
 		MHEDIR=${MHEDIR}  $LOG 21
 	mv lisp/*.elc utils/*.el .
-	rm -rf tex utils lisp Makefile
+	rm -rf tex utils lisp Makefile ${TMPGNUPGHOME}
 	${FLAVOR} ${COMPILE} *.el  $LOG 21
 	)
 	cat  ${ELCDIR}/load-path.el EOF 
diff -Nru bbdb-2.36/debian/changelog bbdb-2.36/debian/changelog
--- bbdb-2.36/debian/changelog	2010-12-12 16:03:00.0 +0100
+++ bbdb-2.36/debian/changelog	2012-11-27 14:48:38.0 +0100
@@ -1,3 +1,12 @@
+bbdb (2.36-2.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * debian/bbdb.emacsen-install: no longer create /root/.gnupg during
+installation of the package. This is achieved by binding GNUPGHOME to a
+temporary directory during bytecode compilation (Closes: #694417)
+
+ -- Sébastien Villemot sebast...@debian.org  Tue, 27 Nov 2012 14:32:04 +0100
+
 bbdb (2.36-2) unstable; urgency=low
 
   * Update to bbdb-vcard 0.3, which better parses birthdays

-- 
 .''`.Sébastien Villemot
: :' :Debian Developer
`. `' http://www.dynare.org/sebastien
  `-  GPG Key: 4096R/381A7594


pgpmySpe31ocn.pgp
Description: PGP signature


Bug#694417: bbdb: package installation creates /root/.gnupg/*

2012-11-26 Thread Andreas Beckmann
Package: bbdb
Version: 2.36-2
Severity: serious
User: debian...@lists.debian.org
Usertags: piuparts

Hi,

during a test with piuparts I noticed that your package creates files in
/root. From the attached log (scroll to the bottom):

1m4.7s ERROR: FAIL: Package purging left files on system:
  /root/.gnupg/  not owned
  /root/.gnupg/gpg.conf  not owned
  /root/.gnupg/pubring.gpg   not owned
  /root/.gnupg/secring.gpg   not owned

Creating stuff in /root is a FHS and policy violation. (And of course
these files should not be deleted by maintainer scripts.)
But it is also an indication that the package operation may depend on
root's .gnupg configuration (and package installation might even fail if
that configuration is broken). That would be a case for configuration
files not in /etc.


Cheers,

Andreas


bbdb_2.36-2.log.gz
Description: GNU Zip compressed data