Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 131524 - app-office/lyx: sandbox Violation
Summary: app-office/lyx: sandbox Violation
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: CJK Team
URL:
Whiteboard:
Keywords:
: 149684 151192 151970 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-04-27 17:07 UTC by Mike McQuaid
Modified: 2008-02-10 21:47 UTC (History)
14 users (show)

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


Attachments
Lyx emerge log (5151-lyx-1.4.1-r1.log,691.95 KB, text/x-log)
2006-05-25 09:07 UTC, Mike McQuaid
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike McQuaid 2006-04-27 17:07:12 UTC
On compiling lyx, with sanbox enabled,  I get this:

make[2]: Leaving directory `/var/tmp/portage/lyx-1.4.1/work/lyx-1.4.1/lib'
make[1]: Leaving directory `/var/tmp/portage/lyx-1.4.1/work/lyx-1.4.1/lib'
make[1]: Entering directory `/var/tmp/portage/lyx-1.4.1/work/lyx-1.4.1'
cp -p ./lyx.man lyx.1
make[1]: Leaving directory `/var/tmp/portage/lyx-1.4.1/work/lyx-1.4.1'
>>> Source compiled.
--------------------------- ACCESS VIOLATION SUMMARY ---------------------------
LOG FILE = "/var/log/sandbox/sandbox-app-office_-_lyx-1.4.1-31520.log"

mkdir:     /var/cache/fonts/tfm/jknappen
mkdir:     /var/cache/fonts/tfm/jknappen/ec
--------------------------------------------------------------------------------
Comment 1 Mike McQuaid 2006-04-27 17:08:56 UTC
ortage 2.1_pre9-r4 (default-linux/amd64/2006.0, gcc-4.1.0, glibc-2.4-r1, 2.6.16-gentoo-m249 x86_64)
=================================================================
System uname: 2.6.16-gentoo-m249 x86_64 AMD Athlon(tm) 64 Processor 3000+
Gentoo Base System version 1.12.0_pre18
ccache version 2.3 [disabled]
dev-lang/python:     2.4.2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=athlon64 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/3/share/config /usr/share/X11/xkb /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=athlon64 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.blueyonder.co.uk ftp://mirrors.blueyonder.co.uk/mirrors/gentoo"
LANG="en_GB.UTF-8"
LC_ALL="en_GB.UTF-8"
LINGUAS="en_GB"
MAKEOPTS="-j2"
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="amd64 X aac abook acpi alsa amarok asf audiofile avi bash-completion bitmap-fonts bluetooth browserplugin cairo ccache cdinstall cdparanoia cdrom clamav cli css cups custom-cflags dbus dri dvd dvdr dvdread emboss emul-linux-x86 encode exif extraicons extramodules extras fbcon fbsplash ffmpeg flac flash gecko-sdk gif gimp glibc-omitfp glitz glx gnokii gphoto2 gpm gtk gtk2 hal html http imap imlib imlib2 irc isdnlog jack java javascript joystick jpeg kcal kde kdepim lame lm_sensors lzw-tiff mad mikmod mouse mozsvg mp3 mpeg mpeg2 mplayer msn msnextras music musicbrainz ncurses net nfs nls nntp nocardbus nocd nomac nopop3d nosendmail nptl nptlonly nsplugin ntfs ntlm nvidia offensive ogg oggvorbis openal opengl oss pam passfile password pcre pdf pdflib png pnp print qemu-fast qt quicktime rdesktop readline reflection reiserfs remix samba scanner sdl session sms sox speech spell spl sse-filters ssl svg tcpd tidy tiff transcode truetype truetype-fonts type1-fonts unicode usb userlocales utf8 videos vim vim-pager vim-with-x visualization vnc voice vorbis wifi wxgtk1 xcomposite xine xinerama xorg xpm xscreensaver xv xvid xvmc zip zlib elibc_glibc input_devices_evdev input_devices_keyboard input_devices_mouse kernel_linux linguas_en_GB userland_GNU video_cards_nvidia video_cards_nv"
Unset:  ASFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS
Comment 2 Martin Ehmsen (RETIRED) gentoo-dev 2006-05-20 15:12:18 UTC
This seems very similar to bug 22224. I'll make a patch tomorrow.
Comment 3 Martin Ehmsen (RETIRED) gentoo-dev 2006-05-21 04:40:02 UTC
Please try to sync (wait a couple of hours for the mirrors to sync up) and then emerge lyx-1.4.1-r1.
I hope I have fixed it, if not then please reopen this bug (and if possible try to locate where latex is being run and hence creates the access violation).
Comment 4 Mike McQuaid 2006-05-22 07:27:25 UTC
Still there.
The problem seems to be the mkdirs, as noted above.
Comment 5 Antek Grzymała (antoszka) 2006-05-23 10:14:24 UTC
Same here. Guess bug should be renamed to lyx 1.4.1 and 1.4.1-r1 sandbox violation.
Comment 6 Martin Ehmsen (RETIRED) gentoo-dev 2006-05-25 08:33:48 UTC
(In reply to comment #4)
> The problem seems to be the mkdirs, as noted above.

The mkdirs are not lyx's fault. The sandbox violation is caused by font generation when latex (or some other tex variant) is being run.
So we need to locate where [la]tex is being run in the lyx build process.
I thought I had the problem located (at least I found some places where latex was being run and patched those), but apparently I didn't find them all.

The strange thing is that i'm not able to reproduce the error myself. So if someone can attached a complete build log or otherwise locate the cause of the bug, we will be one step closer to fixing this.
Comment 7 Mike McQuaid 2006-05-25 09:05:44 UTC
So, shall I just attach the entire portage-generated logfile for Lyx?
Comment 8 Mike McQuaid 2006-05-25 09:07:30 UTC
Created attachment 87491 [details]
Lyx emerge log

I've attached the log file of my last Lyx emerge
Comment 9 E. Papegaaij 2006-09-26 02:21:11 UTC
I'm also getting an access violation with 1.4.2:
--------------------------- ACCESS VIOLATION SUMMARY ---------------------------
LOG FILE = "/var/log/sandbox/sandbox-app-office_-_lyx-1.4.2-7746.log"

unlink:    /var/cache/fontconfig/d15f2f95ed7cadc4ef40eae0f8a5662a-x86-64.cache-2
unlink:    /root/.fontconfig/d15f2f95ed7cadc4ef40eae0f8a5662a-x86-64.cache-2
--------------------------------------------------------------------------------

But this is during the install phase of make:
make[2]: Leaving directory `/var/tmp/portage/lyx-1.4.2/work/lyx-1.4.2'
make[1]: Leaving directory `/var/tmp/portage/lyx-1.4.2/work/lyx-1.4.2'
mkdir -p /var/tmp/portage/lyx-1.4.2/image//usr/share/fonts/latex-xft-fonts
for i in cmex10.ttf cmmi10.ttf cmr10.ttf cmsy10.ttf msam10.ttf msbm10.ttf wasy10.ttf ; do \
                install -m 0644 $i /var/tmp/portage/lyx-1.4.2/image//usr/share/fonts/latex-xft-fonts ; \
        done
opendir: No such file or directory
/var/tmp/portage/lyx-1.4.2/image//usr/share/fonts/latex-xft-fonts: failed to write cache
ACCESS DENIED  unlink:    /var/cache/fontconfig/d15f2f95ed7cadc4ef40eae0f8a5662a-x86-64.cache-2
ACCESS DENIED  unlink:    /root/.fontconfig/d15f2f95ed7cadc4ef40eae0f8a5662a-x86-64.cache-2
>>> Completed installing lyx-1.4.2 into /var/tmp/portage/lyx-1.4.2/image/
Comment 10 Arun Raghavan (RETIRED) gentoo-dev 2006-09-26 05:10:49 UTC
(In reply to comment #9)

I get the same error too, with lyx-1.4.2. Don't think it's a CJK-team specific issue.
Comment 11 Matteo Manduzio 2006-09-29 05:29:37 UTC
here i have the same problem with lyx 1.4.2


--------------------------------[cut]------------------------------------
mkdir -p /var/tmp/portage/lyx-1.4.2/image//usr/share/fonts/latex-xft-fonts
for i in cmex10.ttf cmmi10.ttf cmr10.ttf cmsy10.ttf msam10.ttf msbm10.ttf wasy10.ttf ; do \
                install -m 0644 $i /var/tmp/portage/lyx-1.4.2/image//usr/share/fonts/latex-xft-fonts ; \
        done
opendir: No such file or directory
/var/tmp/portage/lyx-1.4.2/image//usr/share/fonts/latex-xft-fonts: failed to write cache
ACCESS DENIED  unlink:    /var/cache/fontconfig/d15f2f95ed7cadc4ef40eae0f8a5662a-x86-64.cache-2
ACCESS DENIED  unlink:    /root/.fontconfig/d15f2f95ed7cadc4ef40eae0f8a5662a-x86-64.cache-2
>>> Completed installing lyx-1.4.2 into /var/tmp/portage/lyx-1.4.2/image/

--------------------------- ACCESS VIOLATION SUMMARY ---------------------------LOG FILE = "/var/log/sandbox/sandbox-app-office_-_lyx-1.4.2-11656.log"

unlink:    /var/cache/fontconfig/d15f2f95ed7cadc4ef40eae0f8a5662a-x86-64.cache-2unlink:    /root/.fontconfig/d15f2f95ed7cadc4ef40eae0f8a5662a-x86-64.cache-2
--------------------------------------------------------------------------------

the problem seems to be solved for someone.... http://forums.gentoo.org/viewtopic-t-501272-highlight-lyx.html

but not for me!
how it is possible? 
Comment 12 Jakub Moc (RETIRED) gentoo-dev 2006-10-01 00:04:35 UTC
*** Bug 149684 has been marked as a duplicate of this bug. ***
Comment 13 Ulrich Müller gentoo-dev 2006-10-03 01:37:33 UTC
Same problem here with lyx-1.4.2. The error message is identical to the one of comment #9.

(In reply to comment #6)
> The sandbox violation is caused by font generation when latex (or some
> other tex variant) is being run.
> So we need to locate where [la]tex is being run in the lyx build process.

Looks like this has nothing to do with the Lyx build process or with TeX, but is a home-made Gentoo problem...

> So if someone can attached a complete build log or otherwise locate the
> cause of the bug, we will be one step closer to fixing this.

The sandbox violation occurs in src_install, in the line:
	HOME=/root fc-cache -f "${D}"/usr/share/fonts/latex-xft-fonts
Comment 14 Ira Snyder 2006-10-03 11:14:52 UTC
(In reply to comment #13)
> Same problem here with lyx-1.4.2. The error message is identical to the one of
> comment #9.
> 
> (In reply to comment #6)
> > The sandbox violation is caused by font generation when latex (or some
> > other tex variant) is being run.
> > So we need to locate where [la]tex is being run in the lyx build process.
> 
> Looks like this has nothing to do with the Lyx build process or with TeX, but
> is a home-made Gentoo problem...
> 
> > So if someone can attached a complete build log or otherwise locate the
> > cause of the bug, we will be one step closer to fixing this.
> 
> The sandbox violation occurs in src_install, in the line:
>         HOME=/root fc-cache -f "${D}"/usr/share/fonts/latex-xft-fonts
> 

Maybe latex-xft-fonts could be broken out into another package? (And then have Lyx depend on it) I would think that this could solve the problem, since all of the other fonts seem to manage it.
Comment 15 Jakub Moc (RETIRED) gentoo-dev 2006-10-13 09:05:07 UTC
*** Bug 151192 has been marked as a duplicate of this bug. ***
Comment 16 M. Edward Borasky 2006-10-13 21:35:12 UTC
I have two boxes. One has lyx 1.4.2 installed and I don't recall a sandbox error or anything I had to do to prevent one. The other box doesn't have lyx and I get a sandbox error trying to install it. In any event, as another bug notes, 1.4.3 is out and I'm going to attempt a pure source install of 1.4.3 on the one that's getting the sandbox errors.
Comment 17 Donnie Berkholz (RETIRED) gentoo-dev 2006-10-15 23:12:22 UTC
Fixed in CVS w approval of nattfodd.

$ cvs diff lyx-1.4.2.ebuild ChangeLog 
Index: lyx-1.4.2.ebuild
===================================================================
RCS file: /var/cvsroot/gentoo-x86/app-office/lyx/lyx-1.4.2.ebuild,v
retrieving revision 1.2
diff -u -b -B -r1.2 lyx-1.4.2.ebuild
--- lyx-1.4.2.ebuild    25 Sep 2006 08:31:32 -0000      1.2
+++ lyx-1.4.2.ebuild    16 Oct 2006 06:10:02 -0000
@@ -2,8 +2,10 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Header: /var/cvsroot/gentoo-x86/app-office/lyx/lyx-1.4.2.ebuild,v 1.2 2006/09/25 08:31:32 corsair Exp $
 
-inherit kde-functions fdo-mime eutils libtool flag-o-matic
+inherit kde-functions fdo-mime eutils libtool flag-o-matic font
 
+FONT_PN="latex-xft-fonts"
+FONT_S="${WORKDIR}/${FONT_PN}"
 CJK_PATCH="CJK-LyX-qt-${PV}-1.patch"
 DESCRIPTION="WYSIWYM frontend for LaTeX"
 HOMEPAGE="http://www.lyx.org/"
@@ -135,12 +137,7 @@
        cd "${WORKDIR}"/latex-xft-fonts-0.1
        emake DESTDIR="${D}" install || die "Font installation failed"
 
-       mkfontscale "${D}"/usr/share/fonts/latex-xft-fonts
-       mkfontdir -e /usr/share/fonts/encodings \
-               -e /usr/share/fonts/encodings/large \
-               -e /usr/X11R6/$(get_libdir)/X11/fonts/encodings \
-               "${D}"/usr/share/fonts/latex-xft-fonts
-       HOME=/root fc-cache -f "${D}"/usr/share/fonts/latex-xft-fonts
+       font_src_install
 
        # bug #102310
        if use gnome ; then
@@ -153,6 +150,8 @@
 }
 
 pkg_postinst() {
+       font_pkg_postinst
+
        # fix for bug 91108
        texhash
 
Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/app-office/lyx/ChangeLog,v
retrieving revision 1.88
diff -u -b -B -r1.88 ChangeLog
--- ChangeLog   25 Sep 2006 08:31:32 -0000      1.88
+++ ChangeLog   16 Oct 2006 06:10:02 -0000
@@ -2,6 +2,10 @@
 # Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2
 # $Header: /var/cvsroot/gentoo-x86/app-office/lyx/ChangeLog,v 1.88 2006/09/25 08:31:32 corsair Exp $
 
+  16 Oct 2006; Donnie Berkholz <dberkholz@gentoo.org>; lyx-1.4.2.ebuild:
+  (#131524) Use font.eclass to avoid sandbox violations with >=fontconfig-2.4.
+  nattfodd says fine to commit.
+
   25 Sep 2006; Markus Rothe <corsair@gentoo.org> lyx-1.4.2.ebuild:
   Added ~ppc64; bug #149013
 
Comment 18 M. Edward Borasky 2006-10-16 05:54:17 UTC
Meanwhile, 1.4.3 installs fine and runs fine from upstream source.
Comment 19 Jakub Moc (RETIRED) gentoo-dev 2006-10-19 10:18:18 UTC
*** Bug 151970 has been marked as a duplicate of this bug. ***
Comment 20 Shawn Rutledge 2007-02-17 06:31:25 UTC
I'm having this problem still with 1.4.1, and 1.4.2 is not marked stable yet (why?)

make[2]: Entering directory `/var/tmp/portage/app-office/lyx-1.4.1-r1/work/lyx-1.4.1'
make[2]: Nothing to be done for `install-exec-am'.
test -z "/var/tmp/portage/app-office/lyx-1.4.1-r1/image//usr/share/man/man1" || mkdir -p -- "/var/tmp/portage/app-office/lyx-1.4.1-r1/image//usr/share/man/man1"
 /bin/install -c -m 644 './lyx.1' '/var/tmp/portage/app-office/lyx-1.4.1-r1/image//usr/share/man/man1/lyx.1'
make[2]: Leaving directory `/var/tmp/portage/app-office/lyx-1.4.1-r1/work/lyx-1.4.1'
make[1]: Leaving directory `/var/tmp/portage/app-office/lyx-1.4.1-r1/work/lyx-1.4.1'
mkdir -p /var/tmp/portage/app-office/lyx-1.4.1-r1/image//usr/share/fonts/latex-xft-fonts
for i in cmex10.ttf cmmi10.ttf cmr10.ttf cmsy10.ttf msam10.ttf msbm10.ttf wasy10.ttf ; do \
                install -m 0644 $i /var/tmp/portage/app-office/lyx-1.4.1-r1/image//usr/share/fonts/latex-xft-fonts ; \
        done
opendir: No such file or directory
/var/tmp/portage/app-office/lyx-1.4.1-r1/image//usr/share/fonts/latex-xft-fonts: failed to write cache
ACCESS DENIED  unlink:    /var/cache/fontconfig/fe262e76be55354e68ab8998296a501b-x86.cache-2
ACCESS DENIED  unlink:    /root/.fontconfig/fe262e76be55354e68ab8998296a501b-x86.cache-2
>>> Completed installing lyx-1.4.1-r1 into /var/tmp/portage/app-office/lyx-1.4.1-r1/image/

--------------------------- ACCESS VIOLATION SUMMARY ---------------------------
LOG FILE = "/var/log/sandbox/sandbox-app-office_-_lyx-1.4.1-r1-16467.log"

unlink:    /var/cache/fontconfig/fe262e76be55354e68ab8998296a501b-x86.cache-2
unlink:    /root/.fontconfig/fe262e76be55354e68ab8998296a501b-x86.cache-2
--------------------------------------------------------------------------------