Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 215716 - Sandbox Violation during attempted installation of Spamassassin
Summary: Sandbox Violation during attempted installation of Spamassassin
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo Perl team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-01 15:31 UTC by Xavian-Anderson Macpherson
Modified: 2009-11-26 16:45 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (portage.info_2008.04.01.08:55:25,17.99 KB, text/plain)
2008-04-01 16:43 UTC, Xavian-Anderson Macpherson
Details
portage.info_2008.04.04.14:13:50 (portage.info_2008.04.04.14:13:50,18.81 KB, text/plain)
2008-04-05 05:22 UTC, Xavian-Anderson Macpherson
Details
spamassassin-3.2.4.build.log (spamassassin-3.2.4.build.log,55.89 KB, text/plain)
2008-04-05 05:23 UTC, Xavian-Anderson Macpherson
Details
Patchfile for spamassassin-3.2.1-r1: Points SYSCONFDIR and DATADIR to sandbox dirs (spamassassin-3.2.1-r1.ebuild.patch,535 bytes, patch)
2008-05-03 03:57 UTC, Mark Mykkanen
Details | Diff
mail-filter/spamassassin-3.2.4-r1.ebuild : Points SYSCONFDIR and DATADIR to sandbox dirs (spamassassin-3.2.4-r1.ebuild,7.87 KB, text/plain)
2008-05-09 13:02 UTC, Robin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Xavian-Anderson Macpherson 2008-04-01 15:31:31 UTC
Sandbox Violation during attempted installation of Spamassassin as a dependency for Kolabd.

Reproducible: Always

Steps to Reproduce:
1. Emerge Spamassassin-3.2.4
2.
3.

Actual Results:  
Writing /var/tmp/portage/mail-filter/spamassassin-3.2.4/image//usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/auto/Mail/SpamAssassin/.packlist
Appending installation info to /var/tmp/portage/mail-filter/spamassassin-3.2.4/image//usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/perllocal.pod
/usr/bin/perl5.8.8 "-MExtUtils::Command" -e mkpath /etc/mail/spamassassin
ACCESS DENIED  mkdir:     /etc/mail/spamassassin
mkdir /etc/mail/spamassassin: Permission denied at /usr/lib64/perl5/5.8.8/ExtUtils/Command.pm line 259
make: [conf__install] Error 13 (ignored)
/usr/bin/perl5.8.8 -MFile::Copy -e "copy(q{rules/local.cf}, q{/etc/mail/spamassassin/local.cf}) unless -f q{/etc/mail/spamassassin/local.cf}"
ACCESS DENIED  open_wr:   /etc/mail/spamassassin/local.cf
/usr/bin/perl5.8.8 -MFile::Copy -e "copy(q{rules/init.pre}, q{/etc/mail/spamassassin/init.pre}) unless -f q{/etc/mail/spamassassin/init.pre}"
ACCESS DENIED  open_wr:   /etc/mail/spamassassin/init.pre
/usr/bin/perl5.8.8 -MFile::Copy -e "copy(q{rules/v310.pre}, q{/etc/mail/spamassassin/v310.pre}) unless -f q{/etc/mail/spamassassin/v310.pre}"
ACCESS DENIED  open_wr:   /etc/mail/spamassassin/v310.pre
/usr/bin/perl5.8.8 -MFile::Copy -e "copy(q{rules/v312.pre}, q{/etc/mail/spamassassin/v312.pre}) unless -f q{/etc/mail/spamassassin/v312.pre}"
ACCESS DENIED  open_wr:   /etc/mail/spamassassin/v312.pre
/usr/bin/perl5.8.8 -MFile::Copy -e "copy(q{rules/v320.pre}, q{/etc/mail/spamassassin/v320.pre}) unless -f q{/etc/mail/spamassassin/v320.pre}"
ACCESS DENIED  open_wr:   /etc/mail/spamassassin/v320.pre
/usr/bin/perl5.8.8 "-MExtUtils::Command" -e mkpath /usr/share/spamassassin
ACCESS DENIED  mkdir:     /usr/share/spamassassin
mkdir /usr/share/spamassassin: Permission denied at /usr/lib64/perl5/5.8.8/ExtUtils/Command.pm line 259
make: [data__install] Error 13 (ignored)
/usr/bin/perl5.8.8 -e "map unlink, </usr/share/spamassassin/*>"
/usr/bin/perl build/preprocessor -Mvars -DVERSION="3.002004" -DPREFIX="/usr" -DDEF_RULES_DIR="/usr/share/spamassassin" -DLOCAL_RULES_DIR="/etc/mail/spamassassin" -DLOCAL_STATE_DIR="/var/lib/spamassassin" -DINSTALLSITELIB="/usr/lib64/perl5/vendor_perl/5.8.8" -DCONTACT_ADDRESS="the administrator of that system" -m644 -Irules -O/usr/share/spamassassin 10_default_prefs.cf 11_gentoo.cf 20_advance_fee.cf 20_body_tests.cf 20_compensate.cf 20_dnsbl_tests.cf 20_drugs.cf 20_dynrdns.cf 20_fake_helo_tests.cf 20_head_tests.cf 20_html_tests.cf 20_imageinfo.cf 20_meta_tests.cf 20_net_tests.cf 20_phrases.cf 20_porn.cf 20_ratware.cf 20_uri_tests.cf 20_vbounce.cf 23_bayes.cf 25_accessdb.cf 25_antivirus.cf 25_asn.cf 25_dcc.cf 25_dkim.cf 25_domainkeys.cf 25_hashcash.cf 25_pyzor.cf 25_razor2.cf 25_replace.cf 25_spf.cf 25_textcat.cf 25_uribl.cf 30_text_de.cf 30_text_fr.cf 30_text_it.cf 30_text_nl.cf 30_text_pl.cf 30_text_pt_br.cf 50_scores.cf 60_awl.cf 60_shortcircuit.cf 60_whitelist.cf 60_whitelist_dk.cf 60_whitelist_dkim.cf 60_whitelist_spf.cf 60_whitelist_subject.cf 72_active.cf user_prefs.template languages sa-update-pubkey.txt
ACCESS DENIED  open_wr:   /usr/share/spamassassin/10_default_prefs.cf
Cannot open /usr/share/spamassassin/10_default_prefs.cf: Permission denied at build/preprocessor line 127.
make: *** [data__install] Error 13
 * 
 * ERROR: mail-filter/spamassassin-3.2.4 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_install
 *             environment, line 2549:  Called perl-module_src_install
 *             environment, line 2193:  Called die
 * The specific snippet of code:
 *           make ${myinst} ${mytargets} || die;
 *  The die message:
 *   (no error message)
 * 
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/mail-filter/spamassassin-3.2.4/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/mail-filter/spamassassin-3.2.4/temp/environment'.
 * 
--------------------------- ACCESS VIOLATION SUMMARY ---------------------------
LOG FILE = "/var/log/sandbox/sandbox-8341.log"

mkdir:     /etc/mail/spamassassin
open_wr:   /etc/mail/spamassassin/local.cf
open_wr:   /etc/mail/spamassassin/init.pre
open_wr:   /etc/mail/spamassassin/v310.pre
open_wr:   /etc/mail/spamassassin/v312.pre
open_wr:   /etc/mail/spamassassin/v320.pre
mkdir:     /usr/share/spamassassin
open_wr:   /usr/share/spamassassin/10_default_prefs.cf
--------------------------------------------------------------------------------

 * GNU info directory index is up-to-date.



Expected Results:  
Spamassassin should install and not prevent the installation of Kolab.
Comment 1 Xavian-Anderson Macpherson 2008-04-01 15:51:58 UTC
Manually running the "mkdir -p /etc/mail/spamassassin" command doesn't fix this.
Comment 2 Xavian-Anderson Macpherson 2008-04-01 16:43:04 UTC
Created attachment 147983 [details]
emerge --info
Comment 3 Dirk Heinrichs 2008-04-02 16:55:34 UTC
Same here, on x86. Seems to affect all versions of spamassassin currently
available in portage.
Comment 4 Xavian-Anderson Macpherson 2008-04-05 05:22:29 UTC
Created attachment 148700 [details]
portage.info_2008.04.04.14:13:50

emerge --info
Comment 5 Xavian-Anderson Macpherson 2008-04-05 05:23:09 UTC
Created attachment 148702 [details]
spamassassin-3.2.4.build.log

spamassassin-3.2.4.build.log
Comment 6 Xavian-Anderson Macpherson 2008-04-21 14:34:00 UTC
Is anyone going to fix this? I can't install Kolab without this.

Shingoshi
Comment 7 Xavian-Anderson Macpherson 2008-04-21 19:00:07 UTC
Is this a problem with spamassassin or sandbox? Is it that this program wasn't written correctly, or what? I'm inclined to think this program is the culprit, since every thing else compiles without trouble. Well, I did have another one do this recently. Which I think is why I came back to this and tested it. Still the same thing, after 20 days, and no change.

Shingoshi
Comment 8 Mark Mykkanen 2008-05-03 03:57:37 UTC
Created attachment 151668 [details, diff]
Patchfile for spamassassin-3.2.1-r1: Points SYSCONFDIR and DATADIR to sandbox dirs

Points SYSCONFDIR and DATADIR to sandbox dirs
myconf="SYSCONFDIR=${D}/etc DATADIR=${D}/usr/share/spamassassin"

Apply patch and enjoy.  :)
Comment 9 Xavian-Anderson Macpherson 2008-05-03 05:45:14 UTC
(In reply to comment #8)
> Created an attachment (id=151668) [edit]
> Patchfile for spamassassin-3.2.1-r1: Points SYSCONFDIR and DATADIR to sandbox
> dirs
> 
> Points SYSCONFDIR and DATADIR to sandbox dirs
> myconf="SYSCONFDIR=${D}/etc DATADIR=${D}/usr/share/spamassassin"
> 
> Apply patch and enjoy.  :)
> 

Please forgive me for my ignorance. I thank you for the patch. But how do I apply it now. Do I apply this against the ebuild (I'm guessing this is yes). I haven't had to patch any Gentoo files before, so I don't know what the proper protocol is here. Is there a tool specifically for applying patches to Gentoo builds? Please forgive my ignorance, and be patient with me.

I'm guessing this will be applied to all further ebuilds for spamassassin? I hope so, as someone here pointed out, this is affecting all ebuilds of spamassassin.

Thank you,
Shingoshi
Comment 10 Xavian-Anderson Macpherson 2008-05-03 05:50:55 UTC
I just checked the changelog for spamassassin, and it seems like the patch has already been applied to the ebuild. I'll have to wait until my system isn't crashing every time I try to emerge, so I can build this (long story, I'll spare you the details).

Thanks again,
Shingoshi
Comment 11 Xavian-Anderson Macpherson 2008-05-04 01:54:49 UTC
(In reply to comment #10)
> I just checked the changelog for spamassassin, and it seems like the patch has
> already been applied to the ebuild. I'll have to wait until my system isn't
> crashing every time I try to emerge, so I can build this (long story, I'll
> spare you the details).
> 
> Thanks again,
> Shingoshi
> 

I need to know if I was wrong here. I just attempted to compile spamassassin, and wound up with the same result as before. So am I supposed to copy this patch to the ebuild's directory and patch the ebuild there. Because if I was right, and this is already included in the last ebuilds, this hasn't worked for me.

Shingoshi
Comment 12 Robin 2008-05-09 13:02:29 UTC
Created attachment 152609 [details]
mail-filter/spamassassin-3.2.4-r1.ebuild  : Points SYSCONFDIR and DATADIR to sandbox dirs

spamassassin-3.2.4 ebuild fixed
Comment 13 Xavian-Anderson Macpherson 2008-05-10 02:16:47 UTC
(In reply to comment #12)
> Created an attachment (id=152609) [edit]
> mail-filter/spamassassin-3.2.4-r1.ebuild  : Points SYSCONFDIR and DATADIR to
> sandbox dirs
> 
> spamassassin-3.2.4 ebuild fixed
> 

(In reply to comment #12)
> Created an attachment (id=152609) [edit]
> mail-filter/spamassassin-3.2.4-r1.ebuild  : Points SYSCONFDIR and DATADIR to
> sandbox dirs
> 
> spamassassin-3.2.4 ebuild fixed
> 

(In reply to comment #12)
> Created an attachment (id=152609) [edit]
> mail-filter/spamassassin-3.2.4-r1.ebuild  : Points SYSCONFDIR and DATADIR to
> sandbox dirs
> 
> spamassassin-3.2.4 ebuild fixed
> 

I'm sorry, but I'm a complete novice here. I tried copying that to my portage tree, and that doesn't work. So how exactly do I go about using this file. If you explain this, I can create whatever directories and a script to make this work from now on.

Shingoshi
Comment 14 Xavian-Anderson Macpherson 2008-05-11 00:03:42 UTC
How long will it be before spamassassin-3.2.4-r1 is put in portage? Or was this simply something unofficially produced by one individual?

Shingoshi
Comment 15 Dirk Heinrichs 2008-05-23 08:43:24 UTC
Works for me, now.
Comment 16 Mike Civil 2008-09-11 11:00:52 UTC
Is this fix going to make it into portage? The SYSCONFDIR/DATADIR patch still seems to be needed for 3.2.5 to avoid sandbox errors.
Comment 17 Peter Adkins 2008-10-28 22:28:19 UTC
The problem still exists. Workaround for people who are facing this problem:

FEATURES='-sandbox' emerge spamassassin
Comment 18 Dan Reidy 2009-07-18 22:57:27 UTC
ACCESS DENIED  unlink:       /usr/share/spamassassin/20_compensate.cf
ACCESS DENIED  unlink:       /usr/share/spamassassin/20_dnsbl_tests.cf
ACCESS DENIED  unlink:       /usr/share/spamassassin/20_drugs.cf
ACCESS DENIED  unlink:       /usr/share/spamassassin/20_dynrdns.cf
ACCESS DENIED  unlink:       /usr/share/spamassassin/20_fake_helo_tests.cf
ACCESS DENIED  unlink:       /usr/share/spamassassin/20_head_tests.cf
ACCESS DENIED  unlink:       /usr/share/spamassassin/20_html_tests.cf
ACCESS DENIED  unlink:       /usr/share/spamassassin/20_imageinfo.cf
ACCESS DENIED  unlink:       /usr/share/spamassassin/20_meta_tests.cf
ACCESS DENIED  unlink:       /usr/share/spamassassin/20_net_tests.cf
ACCESS DENIED  unlink:       /usr/share/spamassassin/20_phrases.cf
ACCESS DENIED  unlink:       /usr/share/spamassassin/20_porn.cf
ACCESS DENIED  unlink:       /usr/share/spamassassin/20_ratware.cf
ACCESS DENIED  unlink:       /usr/share/spamassassin/20_uri_tests.cf
ACCESS DENIED  unlink:       /usr/share/spamassassin/20_vbounce.cf
<snipped... you get the idea>

* mail-filter/spamassassin-3.2.5:0::gentoo: failure

This still hasn't been fixed!
Comment 19 Nathan March 2009-08-26 23:30:49 UTC
(In reply to comment #18)
> This still hasn't been fixed!
> 

18 months later and the ebuilds are still broken.....
Comment 20 Kelly Price 2009-09-27 17:47:08 UTC
I'm caught under this one too.  Just bugged the NetMail guys on IRC #gentoo-netmail to see about taking this one over from the Perl guys.
Comment 21 David Abbott (RETIRED) gentoo-dev 2009-11-26 16:45:39 UTC
Fixed with mail-filter/spamassassin-3.2.5-r1
I am going to close the bug reopen if needed, thanks for reporting and sorry it has taken so long.