Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 79012 - a2ps fails with sandbox violations.
Summary: a2ps fails with sandbox violations.
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Printing Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-21 15:26 UTC by genbug
Modified: 2005-06-13 06:36 UTC (History)
9 users (show)

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


Attachments
Avoid calling acroread (because of sandbox violation). Assume version 4 or later. (a2ps-gentoo-acroread.patch,893 bytes, patch)
2005-06-01 10:57 UTC, Ian Abbott
Details | Diff
Tested version of the acroread sandbox violation patch (a2ps-4.13-acroread.patch,1.47 KB, patch)
2005-06-13 06:35 UTC, Ian Abbott
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description genbug 2005-01-21 15:26:54 UTC
This was supposed to be a security fix. So it would be good if it compiles at least. 

Reproducible: Always
Steps to Reproduce:
1.emerge a2ps
2.fails
3.

Actual Results:  
cd .. && \
  /bin/sh /var/tmp/portage/a2ps-4.13c-r2/work/a2ps-4.13/auxdir/missing --run 
automake-1.6 --gnu  man/Makefile
cd .. && /bin/sh ./config.status man/Makefile 
config.status: creating man/Makefile
make[2]: Leaving directory `/var/tmp/portage/a2ps-4.13c-r2/work/a2ps-4.13/man'
make[2]: Entering directory `/var/tmp/portage/a2ps-4.13c-r2/work/a2ps-4.13/man'
Updating man page a2ps.1
Updating man page card.1
Updating man page fixps.1
Updating man page pdiff.1
Updating man page psmandup.1
Updating man page psset.1
Updating man page texi2dvi4a2ps.1
make[2]: Leaving directory `/var/tmp/portage/a2ps-4.13c-r2/work/a2ps-4.13/man'
make[2]: Entering directory `/var/tmp/portage/a2ps-4.13c-r2/work/a2ps-4.13'
make[2]: Leaving directory `/var/tmp/portage/a2ps-4.13c-r2/work/a2ps-4.13'
make[1]: Leaving directory `/var/tmp/portage/a2ps-4.13c-r2/work/a2ps-4.13'
--------------------------- ACCESS VIOLATION SUMMARY ---------------------------
LOG FILE = "/tmp/sandbox-app-text_-_a2ps-4.13c-r2-10452.log"

open_wr:   /usr/qt/3/etc/settings/.qtrc.lock
open_wr:   /usr/qt/3/etc/settings/.qtrc.lock
--------------------------------------------------------------------------------
-bash-3.00#


Expected Results:  
This was supposed to be a security fix. So it would be good if it compiles at 
least. 

I flagged this on the forum on 13th Jan, someone else confirmed same issue. No 
other replies.

Now I need to emerge -e system this is blocking me.
Comment 1 Carsten Lohrke (RETIRED) gentoo-dev 2005-01-21 16:04:26 UTC
Eh!? This application has nothing to do with Qt. Did you emerge parallel or so?
Comment 2 genbug 2005-01-21 16:12:33 UTC
I did emerge -e world , it failed on a2ps

I removed this lock incase it was left over from a failed qt build.

Directly ran emerge a2ps , it failed exactly the same way.

Also tried 4.13c 4.13c-r1 and r2 , all show same pb.

4.13b* fails with malloc error. (Not this issue but does not help as work around)

I use xfce4 : depends xfprint: depends a2ps.

I can no longer rebuild world.
Comment 3 genbug 2005-01-22 13:47:07 UTC
reverted PORTAGE_TMPDIR  default , same result.

Still cant see why a2ps thinks it has to deal with anything in  /usr/qt/3/etc/settings.

make[2]: Leaving directory `/var/tmp/portage/a2ps-4.13c-r2/work/a2ps-4.13/doc'
Making all in man
make[2]: Entering directory `/var/tmp/portage/a2ps-4.13c-r2/work/a2ps-4.13/man'
cd .. && \
  /bin/sh /var/tmp/portage/a2ps-4.13c-r2/work/a2ps-4.13/auxdir/missing --run automake-1.6 --gnu  man/Makefile
cd .. && /bin/sh ./config.status man/Makefile 
config.status: creating man/Makefile
make[2]: Leaving directory `/var/tmp/portage/a2ps-4.13c-r2/work/a2ps-4.13/man'
make[2]: Entering directory `/var/tmp/portage/a2ps-4.13c-r2/work/a2ps-4.13/man'
Updating man page a2ps.1
Updating man page card.1
Updating man page fixps.1
Updating man page pdiff.1
Updating man page psmandup.1
Updating man page psset.1
Updating man page texi2dvi4a2ps.1
make[2]: Leaving directory `/var/tmp/portage/a2ps-4.13c-r2/work/a2ps-4.13/man'
make[2]: Entering directory `/var/tmp/portage/a2ps-4.13c-r2/work/a2ps-4.13'
make[2]: Nothing to be done for `all-am'.
make[2]: Leaving directory `/var/tmp/portage/a2ps-4.13c-r2/work/a2ps-4.13'
make[1]: Leaving directory `/var/tmp/portage/a2ps-4.13c-r2/work/a2ps-4.13'
--------------------------- ACCESS VIOLATION SUMMARY ---------------------------
LOG FILE = "/tmp/sandbox-app-text_-_a2ps-4.13c-r2-2117.log"

open_wr:   /usr/qt/3/etc/settings/.qtrc.lock
open_wr:   /usr/qt/3/etc/settings/.qtrc.lock
-
Comment 4 genbug 2005-01-24 16:50:16 UTC
Well it took two bloody weeks of wasted effort, but I found it!
By pure coincidence I stumbled on a thread that pointed me in the right direction.

Basic cause was having non-default locale for root.

Some ebuilds , including a2ps , are suseptible to this distrupting scripts. this is the only one of 500 odd packages that gave me an problem but apparently it does affect some php builds as well.

So two conclusions: susseptible ebuilds should probably trap it and throw a warning, stop or simply get fixed (rather than violation sandbox) ; secondly gentoo doc should not advise system wide locale configuration unless this is a stable technique.

Comment 5 Heinrich Wendel (RETIRED) gentoo-dev 2005-02-21 10:19:43 UTC
a2ps now does an export LANG=C
Comment 6 genbug 2005-02-21 12:23:32 UTC
>>a2ps now does an export LANG=C

and ...?

Is that a fix, a work-around, a comment? 

It still seems that if something is getting messed up by LANG_C=en_EN for example it should be fixed, not redefining the locale settings.

Please clarify your comment. 

regards.
Comment 7 Heinrich Wendel (RETIRED) gentoo-dev 2005-02-22 06:06:36 UTC
The ebuild now sets LANG=C before compiling, so locale specific problems, like you described, should be fixed
Comment 8 genbug 2005-02-22 19:06:31 UTC
Thanks for the clarification, your last post said "exports LANG=C", "sets LANG=C" would seem more appropriate.

You say "The ebuild now sets..." . Could you be more precise? Version pls.

I have 4.13c-r2 in portage and this does have the bug.

I just reloaded -r1 from cvs that is commented to have the bug fixed.

I still get the same issue.

make[1]: Leaving directory `/gentoo/usr/portage/tmp/portage/a2ps-4.13c-r1/work/a2ps-4.13'
--------------------------- ACCESS VIOLATION SUMMARY ---------------------------
LOG FILE = "/tmp/sandbox-app-text_-_a2ps-4.13c-r1-9014.log"

open_wr:   /usr/qt/3/etc/settings/.qtrc.lock
open_wr:   /usr/qt/3/etc/settings/.qtrc.lock
--------------------------------------------------------------------------------

This was with LANG=en_GB.UTF-8

Surely the correct way to resolve this issue is to find out what is getting fowled up by non-trivial locale settings and correct it rather than temporarily resetting LANG.

99% of my system builds correctly with this locale , this should not be a hard bug to locate given specifics of the error msg.

HTH
Comment 9 Heinrich Wendel (RETIRED) gentoo-dev 2005-02-23 01:00:18 UTC
a2ps-4.13c-r2 should have this fix, please emerge sync and try again
Comment 10 Daniel Rose 2005-03-20 06:50:02 UTC
Well, I get the following Acess-Violation with a2ps-4.13c-r2:

--------------------------- ACCESS VIOLATION SUMMARY ---------------------------
LOG FILE = "/tmp/sandbox-app-text_-_a2ps-4.13c-r2-15263.log"

mkdir:     /root/.gconf
open_wr:   /root/.gconfd/saved_state
open_wr:   /usr/qt/3/etc/settings/.qtrc.lock
open_wr:   /usr/qt/3/etc/settings/.qt_plugins_3.3rc.lock
open_wr:   /usr/qt/3/etc/settings/.kstylerc.lock
open_wr:   /usr/qt/3/etc/settings/.qtrc.lock
open_wr:   /root/.gconfd/saved_state
open_wr:   /root/.gconfd/saved_state.tmp
open_wr:   /root/.gconfd/saved_state
open_wr:   /usr/qt/3/etc/settings/.qtrc.lock
open_wr:   /usr/qt/3/etc/settings/.qt_plugins_3.3rc.lock
open_wr:   /usr/qt/3/etc/settings/.kstylerc.lock
open_wr:   /usr/qt/3/etc/settings/.qtrc.lock
open_wr:   /root/.gconfd/saved_state
open_wr:   /root/.gconfd/saved_state.tmp
--------------------------------------------------------------------------------
Comment 11 Dan Vande More 2005-03-29 11:07:05 UTC
As do I:

make[1]: Leaving directory `/var/tmp/portage/a2ps-4.13c-r2/work/a2ps-4.13'
--------------------------- ACCESS VIOLATION SUMMARY ---------------------------
LOG FILE = "/tmp/sandbox-app-text_-_a2ps-4.13c-r2-418.log"

open_wr:   /root/.gconf/.testing.writeability
unlink:    /root/.gconf/.testing.writeability
open_wr:   /root/.gconfd/saved_state
open_wr:   /root/.gconfd/saved_state
open_wr:   /root/.gconfd/saved_state.tmp
open_wr:   /root/.gconfd/saved_state
open_wr:   /root/.gconfd/saved_state
open_wr:   /root/.gconfd/saved_state.tmp
--------------------------------------------------------------------------------
Comment 12 Dizzy 2005-04-01 06:12:47 UTC
I get too exactly as comment#11
Comment 13 Max 2005-04-06 07:00:58 UTC
Sadly, so do I. 

========================
LOG FILE = "/tmp/sandbox-app-text_-_a2ps-4.13c-r2-12800.log"

open_wr:   /root/.gconf/.testing.writeability
unlink:    /root/.gconf/.testing.writeability
open_wr:   /root/.gconfd/saved_state
open_wr:   /root/.gconfd/saved_state
open_wr:   /root/.gconfd/saved_state.tmp
open_wr:   /root/.gconfd/saved_state
open_wr:   /root/.gconfd/saved_state
open_wr:   /root/.gconfd/saved_state.tmp

========================


emerge --info:

Portage 2.0.51.19 (default-linux/amd64/2005.0, gcc-3.4.3-20050110, glibc-2.3.4.20050125-r1, 2.6.11-gentoo-r4 x86_64)
=================================================================
System uname: 2.6.11-gentoo-r4 x86_64 AMD Athlon(tm) 64 Processor 3000+
Gentoo Base System version 1.6.10
Python:              dev-lang/python-2.3.5 [2.3.5 (#1, Mar 20 2005, 21:19:35)]
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.4 [enabled]
dev-lang/python:     2.3.5
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.9.5, 1.5, 1.8.5-r3, 1.6.3, 1.7.9-r1, 1.4_p6
sys-devel/binutils:  2.15.92.0.2-r8
sys-devel/libtool:   1.5.14
virtual/os-headers:  2.6.8.1-r4
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CFLAGS="-O3 -march=athlon64 -ffast-math -funroll-all-loops -funit-at-a-time -fpeel-loops -ftracer -funswitch-loops -fomit-frame-pointer -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O3 -march=athlon64 -ffast-math -funroll-all-loops -funit-at-a-time -fpeel-loops -ftracer -funswitch-loops -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox"
GENTOO_MIRRORS="http://ftp.easynet.nl/mirror/gentoo/ http://ftp.snt.utwente.nl/pub/os/linux/gentoo ftp://mirror.scarlet-internet.nl/pub/gentoo ftp://mirror.nutsmaas.nl/gentoo/"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.nl.gentoo.org/gentoo-portage"
USE="amd64 S3TC X aavm acpi acpi4linux adns alsa amd apache2 ared arts audiofile autofs avantgo avi berkdb bitmap-fonts bluetooth bonobo bootsplash bzip2 bzlib cairo calendar caps ccache cddb cdparanoia cdr clamav codecs crypt css cups curl dba dga divx4linux dv dvd dvdr dvdread eds emul-linux encode esd evo ex exif faad fam fb fbcon fbdev ffmpeg flac font-server foomaticdb fortran freetype fs ftp gd gdbm gif gimp gmail gnome gphoto2 gpm graphviz gstreamer gtk gtk2 gtkhtml guile hal icq imagemagick imap imlib irmc java javascript jikes joystick jp2 jpeg jpeg2k junit kde kdeenablefinal kdexdeltas lm_sensors lzo lzw lzw-tiff mad maildir mikmod mime mjpeg motif mozilla moznocompose moznoirc mozsvg mp3 mpeg mpeg2 mpeg4 mplayer msn mysql ncurses network nntp nptl nptlonly offensive ogg oggvorbis openal opengl opens operanom2 opie oscar oss pam perl php pic png posix ppds procmail pthreads python qt quicktime radeon readline rtc scanner sdl session slang smime sockets spamassassin spell sqlite ssl stencil-buffer svg tcltk theora threads tiff timidity truetype truetype-fonts type1-fonts unicode usb userlocales vcd videos vidix vorbis wxwindows xine xml xml2 xmms xosd xpm xprint xrandr xscreensaver xv xvid xvmc yahoo zlib"
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS
Comment 14 Kevin Parent 2005-04-07 08:13:55 UTC
Same problem here.

LOG FILE = "/tmp/sandbox-app-text_-_a2ps-4.13c-r2-14108.log"

open_wr:   /root/.gconf/.testing.writeability
unlink:    /root/.gconf/.testing.writeability
open_wr:   /root/.gconfd/saved_state
open_wr:   /root/.gconfd/saved_state
open_wr:   /root/.gconfd/saved_state
open_wr:   /root/.gconfd/saved_state
open_wr:   /root/.gconfd/saved_state.tmp

emerge info:

Portage 2.0.51.19 (default-linux/amd64/2005.0, gcc-3.4.3, glibc-2.3.4.20041102-r 1, 2.6.11-ck2 x86_64)
=================================================================
System uname: 2.6.11-ck2 x86_64 AMD Athlon(tm) 64 Processor 3500+
Gentoo Base System version 1.4.16
Python:              dev-lang/python-2.3.4-r1 [2.3.4 (#1, Apr  6 2005, 19:05:54) ]
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disab led]
dev-lang/python:     2.3.4-r1
sys-devel/autoconf:  2.59-r6, 2.13
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.4
sys-devel/binutils:  2.15.92.0.2-r7
sys-devel/libtool:   1.5.10-r4
virtual/os-headers:  2.6.8.1-r1, 2.6.8.1-r4
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CFLAGS="-march=k8 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share /config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/ mozilla/defaults/pref /usr/share/config /var/bind /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=k8 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox"
GENTOO_MIRRORS="ftp:///ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://ftp. du.se/pub/os/gentoo http://gentoo.binarycompass.org http://gentoo.chem.wisc.edu/ gentoo/"
LANG="en_US"
LC_ALL="en_US"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="amd64 X alsa apache2 avi berkdb bitmap-fonts cdparanoia cdr crypt cups curl  dga esd evo fam flac font-server foomaticdb fortran gdbm gif gnome gpm gstreame r gtk gtk2 imap imlib irda irmc ithreads java jp2 jpeg ldap libwww lzw lzw-tiff mad mbox mozilla mp3 mpeg mysql mythtv ncurses nls nptl oav offensive ogg oggvor bis opengl oss pam pcre pda pdf pdflib perl png posix ppds pthreads python readl ine samba sdl slang ssl tcltk tcpd tiff truetype truetype-fonts type1-fonts usb userlocales vorbis xml xml2 xmms xpm xrandr xv zlib"
Unset:  ASFLAGS, CBUILD, CTARGET, LDFLAGS


Comment 15 shinewu 2005-04-08 00:38:05 UTC
Sorry to bug you guys.
But I have been haunted by this bug for many
days. If someone could provide some help, I
think I would try fixing it. But I just have no
idea what causes this.
Comment 16 Tim Heinrich 2005-04-08 06:12:20 UTC
Samme error as in comment#11

Here my emerge info:
Portage 2.0.51.19 (default-linux/x86/2005.0, gcc-3.3.5, glibc-2.3.4.20041102-r1, 2.6.11-gentoo-r5 i686)
=================================================================
System uname: 2.6.11-gentoo-r5 i686 AMD Sempron(tm) 2200+
Gentoo Base System version 1.4.16
Python:              dev-lang/python-2.3.4-r1 [2.3.4 (#2, Apr  3 2005, 17:09:23)]
ccache version 2.3 [enabled]
dev-lang/python:     2.3.4-r1
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.7.9-r1, 1.8.5-r3, 1.6.3, 1.9.4, 1.5
sys-devel/binutils:  2.15.92.0.2-r7
sys-devel/libtool:   1.5.10-r4
virtual/os-headers:  2.6.8.1-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer -pipe -mfpmath=sse -mmmx -msse -m3dnow"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer -pipe -mfpmath=sse -mmmx -msse -m3dnow"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
LANG="de_DE.UTF-8"
LC_ALL="de_DE.UTF-8"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/overlays/local"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowex X aac acpi alsa apache2 audiofile avi bash-completion bitmap-fonts bonobo cdparanoia cdr crypt curl dga dio divx4linux dvd dvdr emboss encode esd esound exif fam fbcon ffmpeg fortran ftp gb gd gif gnome gphoto2 gpm gtk gtk2 hal hbci icq imap imlib innodb iodbc java jpeg kdeenablefinal lcms libg++ libwww mad mikmod mime mmx mmxext motif mozilla mp3 mpeg mysql mysqli ncurses network nls nntp nocd nptl nptlonly nvidia odbc ogg oggvorbis opengl oscar pam pdflib php pic pie png posix quicktime readline real scanner sdl silverxp slang spell spl sse ssl svga symlink sysvipc tiff truetype truetype-fonts type1-fonts ucs2 unicode usb videos wmf x86 xine xml2 xmms xv xvid xvmc zlib linguas_de"
Unset:  ASFLAGS, CBUILD, CTARGET, LDFLAGS

Is there any hotfix around? Does FEATURE="-sandbox" worlk?


Comment 17 Tim Heinrich 2005-04-08 06:19:22 UTC
I've tried FEATURES="-sandbox" for my self and it works without errors.
Comment 18 genbug 2005-04-08 08:34:41 UTC
Tim , 

it's hardly surprising that it works, it's a sandbox violation so if you disactivate the sandbox it cant be violated.

That does not stop the prog from screwing around where it shouldn't and potentially blowing a hole in your system because it is buggy and out of control.

This does not seem to worry the maintainers too much because it does not affect  default locale installations.

In the three months since I flagged the bug turning off the locale is the only workaround. At least that lets it compile but it's hardly a bug-fix.

You should probably look at what you allowed it to do by turning off the samdbox protection !
Comment 19 François Bissey 2005-05-13 00:13:05 UTC
I got bitten too. 
Did an emerge -e world this week end and a2ps was one of the package
that failed. The list of violations is growing:
--------------------------- ACCESS VIOLATION SUMMARY ---------------------------
LOG FILE = "/tmp/sandbox-app-text_-_a2ps-4.13c-r2-25473.log"

open_wr:   /root/.gconf/.testing.writeability
unlink:    /root/.gconf/.testing.writeability
open_wr:   /root/.gconfd/saved_state
open_wr:   /usr/qt/3/etc/settings/.qtrc.lock
open_wr:   /usr/qt/3/etc/settings/.qt_plugins_3.3rc.lock
open_wr:   /usr/qt/3/etc/settings/.kstylerc.lock
open_wr:   /usr/qt/3/etc/settings/.qtrc.lock
open_wr:   /usr/qt/3/etc/settings/.plastikstylerc.lock
open_wr:   /root/.gconfd/saved_state
open_wr:   /root/.gconfd/saved_state.tmp
open_wr:   /root/.gconfd/saved_state
open_wr:   /usr/qt/3/etc/settings/.qtrc.lock
open_wr:   /usr/qt/3/etc/settings/.qt_plugins_3.3rc.lock
open_wr:   /usr/qt/3/etc/settings/.kstylerc.lock
open_wr:   /usr/qt/3/etc/settings/.qtrc.lock
open_wr:   /usr/qt/3/etc/settings/.plastikstylerc.lock
open_wr:   /root/.gconfd/saved_state
open_wr:   /root/.gconfd/saved_state.tmp
--------------------------------------------------------------------------------

Now about that "LANG" thing in my case LANG is unset so I would 
presume that it would be interpreted as default. So that "fix"
seem dubious.
On the other hand it didn't break because I was upgrading, it 
should be a rebuilt of the version I already have installed.
So what did the dev do in portage that broke the ebuild?
Or has someone been putting stuff in the ebuild without bumping
the version (I absolutely hate it when it happens). 
Comment 20 Julioromano 2005-05-15 09:44:38 UTC
Similar sandbox violation for me too.
It tries to look for something inside /root/.gconf
Comment 21 Petr Shatunov 2005-05-18 23:40:16 UTC
same problem here... for a2ps-4.13...

it fails with:


Updating man page texi2dvi4a2ps.1
make[2]: Leaving directory `/var/tmp/portage/a2ps-4.13c-r2/work/a2ps-4.13/man'
make[2]: Entering directory `/var/tmp/portage/a2ps-4.13c-r2/work/a2ps-4.13'
make[2]: Nothing to be done for `all-am'.
make[2]: Leaving directory `/var/tmp/portage/a2ps-4.13c-r2/work/a2ps-4.13'
make[1]: Leaving directory `/var/tmp/portage/a2ps-4.13c-r2/work/a2ps-4.13'
--------------------------- ACCESS VIOLATION SUMMARY ---------------------------
LOG FILE = "/tmp/sandbox-app-text_-_a2ps-4.13c-r2-30968.log"

open_wr:   /root/.gconf/.testing.writeability
unlink:    /root/.gconf/.testing.writeability
open_wr:   /root/.gconfd/saved_state
open_wr:   /root/.gconfd/saved_state
open_wr:   /root/.gconfd/saved_state.tmp
open_wr:   /root/.gconfd/saved_state
open_wr:   /root/.gconfd/saved_state
open_wr:   /root/.gconfd/saved_state.tmp
--------------------------------------------------------------------------------


Portage 2.0.51.21-r1 (default-linux/x86/2005.0, gcc-3.3.2, glibc-2.3.5-r0,
2.6.11-ck4 i686)
=================================================================
System uname: 2.6.11-ck4 i686 AMD Sempron(tm)   2500+
Gentoo Base System version 1.4.9
dev-lang/python:     2.3.5
sys-apps/sandbox:    1.2.8
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.5
sys-devel/binutils:  2.15.92.0.2-r8
sys-devel/libtool:   1.4.3-r4, 1.5.16
virtual/os-headers:  2.6.11
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O3 -march=athlon-xp -pipe -fomit-frame-pointer -m3dnow -mmmx -msse
-mfpmath=sse"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.2/share/config
/usr/kde/3/share/config /
/lib/X11/xkb /usr/share/config /usr/share/texmf/dvipdfm/config/
/usr/share/texmf/dvips/config/ /
/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/
/usr/share/texmf/xdvi/ /var
ail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O3 -march=athlon-xp -pipe -fomit-frame-pointer -m3dnow -mmmx -msse
-mfpmath=sse"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://vega.inp.nsk.su/gentoo/"
LANG="ru_RU.KOI8-R"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://vega.inp.nsk.su/gentoo-portage"
USE="x86 3dnow X aalib acpi alsa arts avi berkdb bitmap-fonts cdr crypt cups
curl directfb doc d
emboss encode esd fam flac foomaticdb fortran gd gdbm gif gphoto2 gpm gtk gtk2
imagemagick imlib
va jpeg libg++ libwww mad mikmod mmx motif mp3 mpeg ncurses nls nptl ogg
oggvorbis opengl oss pa
dflib perl png python qt quicktime readline samba sdl slang spell sqlite sse ssl
tcltk tcpd tete
iff truetype truetype-fonts type1-fonts unicode vorbis xine xinerama xml xml2
xmms xv zlib video
rds_radeon userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LC_ALL, LDFLAGS, LINGUAS


oops...


Comment 22 Ian Abbott 2005-05-23 02:26:05 UTC
Same here:

gentoo ~ # cat /tmp/sandbox-app-text_-_a2ps-4.13c-r2-1657.log
open_wr:   /root/.gconf/.testing.writeability
unlink:    /root/.gconf/.testing.writeability
open_wr:   /root/.gconfd/saved_state
open_wr:   /root/.gconfd/saved_state
open_wr:   /root/.gconfd/saved_state.tmp
open_wr:   /root/.gconfd/saved_state
open_wr:   /root/.gconfd/saved_state
open_wr:   /root/.gconfd/saved_state.tmp

My emerge info:

Gentoo Base System version 1.6.11
Portage 2.0.51.21-r1 (default-linux/x86/2005.0/2.4, gcc-3.4.3-20050110,
glibc-2.3.5-r0, 2.6.10-co-0.6.2 i686)
=================================================================
System uname: 2.6.10-co-0.6.2 i686 AMD Duron(tm) processor
dev-lang/python:     2.3.5
sys-apps/sandbox:    1.2.6
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.5
sys-devel/binutils:  2.15.92.0.2-r8
sys-devel/libtool:   1.5.16
virtual/os-headers:  2.4.22-r1
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon -O2 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env
/usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon -O2 -pipe"
DISTDIR="/work/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://www.mirrorservice.org/sites/www.ibiblio.org/gentoo
http://gentoo.oregonstate.edu http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LINGUAS="en_GB"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="x86 X alsa apm arts avi berkdb bitmap-fonts cdr cjk crypt cups curl doc eds
emboss encode esd fam flac foomaticdb fortran gd gdbm gif gnome gpm gstreamer
gtk gtk2 imlib ipv6 java jpeg kde libg++ libwww mad mikmod motif mozsvg mp3 mpeg
ncurses nls ogg oggvorbis opengl oss pam pdflib perl png python qemu-fast qt
quicktime readline samba sdl slang softmmu spell ssl svg svga tcpd tiff truetype
truetype-fonts type1-fonts unicode vorbis xine xml2 xmms xv zlib
video_cards_radeon linguas_en_GB userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, MAKEOPTS

I was emerging on a coLinux guest, but I don't think that is relevant.  I can
emerge on the same system natively if you think it's necessary!
Comment 23 Ian Abbott 2005-05-26 08:52:44 UTC
The /root/.gconfd/* violations seem to be due to Acrobat Reader 7.0.  The
configure script runs /usr/bin/acroread -helpall (if it's installed) to
determine its version, but /usr/bin/acroread runs gconftool-2 (if it's
installed) to check whether accessibility features should be enabled.

One other side effect of the failed emerge is that a /usr/libexec/gconfd-2
daemon running as root is left behind at the end!
Comment 24 Jan Oberlaender 2005-05-27 17:14:07 UTC
Finally, a useful comment!  It's indeed Acrobat messing everything up.  I just built a custom ebuild in which I patched the a2ps sources to not run the acrobat test, and it went through fine.  I put my patch against the ebuild and the patch to add to your files/ directory online:  http://wudika.de/~jan/a2ps-gentoo-acroread-ebuild.patch http://wudika.de/~jan/a2ps-gentoo-acroread.patch  Note: this is quick and dirty!  And it assumes you're not using Acrobat 4 as it's not performing the test anymore.  But if you want it working right now, this hack should take care of it...
Comment 25 genbug 2005-05-28 01:57:47 UTC
Many thanks to Ian for finding the problem and to Jan for the patch. Semms like 
a2ps needs to find another way of dealing with acrobat versions !

Now can I refocus this thread on the original bug that was an issue caused by  
locale being set to something other than default.

LOG FILE = "/tmp/sandbox-app-text_-_a2ps-4.13c-r2-10452.log"

open_wr:   /usr/qt/3/etc/settings/.qtrc.lock
open_wr:   /usr/qt/3/etc/settings/.qtrc.lock

So far all we have is a workaround where the ebuild resets to locale before 
building. This package still cant even deal with en_GB . Since Gentoo is not a 
US only distribution this needs fixing.

Comment 26 Ian Abbott 2005-06-01 10:57:00 UTC
Created attachment 60386 [details, diff]
Avoid calling acroread (because of sandbox violation).  Assume version 4 or later.

Jan, I think the acrobat4 test is meant to test for acrobat reader 4 or later. 
Your patch will make the configure script set a2_cv_com_acroread4=no, but I
think it's better to set a2_cv_com_acroread4=yes.  I doubt there are many
Gentoo installations running Acrobat reader 3!

The attached patch just makes the configure script set a2_cv_com_acroread4=yes.
Comment 27 Ian Abbott 2005-06-02 04:15:53 UTC
genbug, what changes are you expecting when a2ps is built with a non-default locale?
Comment 28 Heinrich Wendel (RETIRED) gentoo-dev 2005-06-07 10:38:28 UTC
thx, added the patch 
Comment 29 genbug 2005-06-07 10:55:48 UTC
>>genbug, what changes are you expecting when a2ps is built with a non-default 
locale?

Like I said above , this thread has got a bit off-track. Nice to have solved the 
acroread bug but the original bug I posted was created by a2ps doing violtations 
in different areas when a non-default locale was defined.

This was not addressed other than to provide a work-around of forcefully 
reverting the locale to "C" , "POSIX" or whatever in the ebuild.

This enables it to compile without the sandbox violation but it cant even handle 
 en_GB locale.

It seems that the underlying bug has not been addressed.

By consequence if I define a locale using a charmap including the euro symbol 
this will get ignored by a2ps.

Nice work on the acro fix. :)
Comment 30 Heinrich Wendel (RETIRED) gentoo-dev 2005-06-07 13:20:12 UTC
sorry, does it still fail for you with non default locales? 
Comment 31 genbug 2005-06-07 14:41:47 UTC
YES.

just did em sync . Can see acroread patch . Now get same sandbox as everyone 
else with en_GB.UTF-8



make[1]: Leaving directory `/usr/portage/tmp/portage/a2ps-4.13c-r2/work/a2ps-4.
13'
--------------------------- ACCESS VIOLATION SUMMARY ---------------------------
LOG FILE = "/tmp/sandbox-app-text_-_a2ps-4.13c-r2-10440.log"

open_wr:   /root/.gconf/.testing.writeability
unlink:    /root/.gconf/.testing.writeability
open_wr:   /root/.gconfd/saved_state
open_wr:   /root/.gconfd/saved_state
open_wr:   /root/.gconfd/saved_state.tmp
----------------------------------------------------------------------------


Unless s/o forgot to post that the original bug has been dealt with, the last 
news I can see is:

>>The ebuild now sets LANG=C before compiling, so locale specific problems, like 
you described, should be fixed.

That is a work-around , not a bug fix. If something more thorough was done, this 
would seem like the right place to post a notification.

Regards.
Comment 32 Heinrich Wendel (RETIRED) gentoo-dev 2005-06-07 15:14:00 UTC
Yes, it is a workaround, but it should work and doesn't produce side effects. 
 
The acroread workaround didn't work correctly, because it only patched 
configure and not configure.in. I fixed that and disabled it globally, it only 
affects the default a2ps.conf and was disabled previously as well since it 
couldn't find acroread5 which was installed in /opt/acroread/bin/ and 
not /usr/bin. 
 
Please verify that it works now. 
Comment 33 genbug 2005-06-07 15:48:18 UTC
>>Yes, it is a workaround, but it should work and doesn't produce side 
effects. 
 
Thanks for the clarification. 

I'll try again next time I sync. Now I need to sync with my pillow.
Comment 34 Jan Oberlaender 2005-06-07 17:55:25 UTC
Great work so far, everyone.

I was wondering -- maybe it would make sense to run something like

strace -o a2ps.trace -ff emerge -u a2ps

or some such and then dig through the trace to find out what the heck is causing
the access to ~/.gconf, if not the acroread call?  Maybe there's a less
brute-force way to do this, but I'd try this.  In fact maybe I will this weekend,
when I have time.  :)
Comment 35 Jan Oberlaender 2005-06-07 17:56:38 UTC
...or, on a second thought, maybe there would be a way to modify the sandbox to
provide some more informative output, telling as much as possible about the
process that was causing the violation?
Comment 36 Ian Abbott 2005-06-09 02:32:20 UTC
(In reply to comment #34)
> I was wondering -- maybe it would make sense to run something like
> 
> strace -o a2ps.trace -ff emerge -u a2ps
> 
> or some such and then dig through the trace to find out what the heck is causing
> the access to ~/.gconf, if not the acroread call?

That's what I did to discover acroread as the culprit!

(Sorry I didn't test the patch.  I didn't think the ebuild would run the
autoconf tools!)
Comment 37 Ian Abbott 2005-06-09 10:55:13 UTC
(In reply to comment #32)
> Yes, it is a workaround, but it should work and doesn't produce side effects. 
>  
> The acroread workaround didn't work correctly, because it only patched 
> configure and not configure.in. I fixed that and disabled it globally, it only 
> affects the default a2ps.conf and was disabled previously as well since it 
> couldn't find acroread5 which was installed in /opt/acroread/bin/ and 
> not /usr/bin. 
>  
> Please verify that it works now. 


I'm not convinced it is correct.  I now get the following in the configure output:

checking for acroread... yes
checking for pdf2ps... yes
checking whether acroread is acroread 4... ./configure: line 18834: acroread4:
command not found
no

Looking at the configure script, it now tries to run acroread4 and greps the
output to see if it supports certain features.  In other words, the test should
be if the installed version of acroread is *at least* version 4.  (The configure
script has already determined that acroread is installed; it's just trying to
figure out what it supports.)

As Gentoo portage has never contained a version of acroread *less than* version
4, it ought to be safe to assume that if acroread is installed it will ber
version 4 or later, so the result of the test should be "yes", not "no" as it is
using the current "fix".

This affects the del.acroread variable in the /etc/a2ps/a2ps.cfg file.  With the
current "fix" this will be suboptimal.  It is unfair to expect the user to
correct it afterwards.
Comment 38 Heinrich Wendel (RETIRED) gentoo-dev 2005-06-09 11:07:21 UTC
I just replaced it with a random command. In the end it doesn't matter, it just 
changes a default value in the config file and until now it couldn't even 
detect acroread5 because this one was in a different $PATH 
Comment 39 Ian Abbott 2005-06-13 03:49:08 UTC
I just tried emerging acroread-5.10, updating the environment and emerging a2ps
again.  The configure script detected acroread okay because it is on the $PATH
(set by /etc/env.d/10acroread5).
Comment 40 Heinrich Wendel (RETIRED) gentoo-dev 2005-06-13 03:57:47 UTC
ok, you are right, but in the end it doesn't matter, it only affects some 
default configuration options that you most likely won't use ever. So does the 
ebuild work for everybody now without sandbox violations? 
Comment 41 Ian Abbott 2005-06-13 06:35:09 UTC
Created attachment 61148 [details, diff]
Tested version of the acroread sandbox violation patch

Here's a new version of the patch to avoid running acroread.  If acroread is on
the path, it is assumed to be version 4 or later.

This version of the patch patches both configure and configure.in to avoid
sandbox violations in both the first run of the configure script and the second
run of the configure script (which is rewritten by the autoconf tools).

This patch can be used instead of the 'sed' in the ebuild:

    epatch ${FILESDIR}/a2ps-4.13-acroread.patch

I've tested it with acroread 5 installed and then acroread 7 installed.  It
worked both times without sandbox violations and the del.acroread variable in
the /etc/a2ps/a2ps.cfg file ended up using the "-size" and "-shrink" options of
acroread 4 or later okay.