Control: tags -1 patch

On 2014-02-14 09:18:10 +0100, Vincent Lefevre wrote:
> I get the following error:
> 
> Setting up sa-compile (3.3.2-8) ...
> Running sa-compile (may take a long time)
> Only one of PREFIX or INSTALL_BASE can be given.  Not both.
> command '/usr/bin/perl Makefile.PL 
> PREFIX=/tmp/.spamassassin25665jgQStqtmp/ignored 
> INSTALLSITEARCH=/var/lib/spamassassin/compiled/5.018/3.003002 
> >>/tmp/.spamassassin25665jgQStqtmp/log' failed: exit 255
> dpkg: error processing package sa-compile (--configure):
>  subprocess installed post-installation script returned error exit status 25

The problem is that the environment (inherited from the user's shell)
isn't cleaned up in the post-installation script, as needed by perl.
Replacing "su debian-spamd" by "su - debian-spamd" fixes the problem
(see attached patch).

-- 
Vincent Lefèvre <vinc...@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
--- debian/sa-compile.postinst~ 2014-02-10 00:56:29.000000000 +0100
+++ debian/sa-compile.postinst  2014-02-14 12:58:44.328309414 +0100
@@ -6,7 +6,7 @@
     # Compile, if rules have previously been compiled, and it's possible
     if [ -x /usr/bin/re2c -a -x /usr/bin/sa-compile ]; then
         echo "Running sa-compile (may take a long time)"
-        su debian-spamd -c "sa-compile --quiet"
+        su - debian-spamd -c "sa-compile --quiet"
         invoke-rc.d spamassassin restart
     fi
 }

Reply via email to