It fails when it tries to install gnect. Tail of the build.log: --- Making install in gnect make[1]: Entering directory `/var/tmp/portage/gnome-extra/gnome-games-2.22.3/work/gnome-games-2.22.3/gnect' Making install in src make[2]: Entering directory `/var/tmp/portage/gnome-extra/gnome-games-2.22.3/work/gnome-games-2.22.3/gnect/src' make[3]: Entering directory `/var/tmp/portage/gnome-extra/gnome-games-2.22.3/work/gnome-games-2.22.3/gnect/src' test -z "/usr/bin" || /bin/mkdir -p "/var/tmp/portage/gnome-extra/gnome-games-2.22.3/image//usr/bin" test -z "/usr/lib/ggz" || /bin/mkdir -p "/var/tmp/portage/gnome-extra/gnome-games-2.22.3/image//usr/lib/ggz" make[3]: Nothing to be done for `install-data-am'. /bin/sh ../../libtool --mode=install /usr/bin/install -c 'gnect' '/var/tmp/portage/gnome-extra/gnome-games-2.22.3/image//usr/bin/gnect' /usr/bin/install -c gnect /var/tmp/portage/gnome-extra/gnome-games-2.22.3/image//usr/bin/gnect make[3]: Leaving directory `/var/tmp/portage/gnome-extra/gnome-games-2.22.3/work/gnome-games-2.22.3/gnect/src' make[2]: Leaving directory `/var/tmp/portage/gnome-extra/gnome-games-2.22.3/work/gnome-games-2.22.3/gnect/src' Making install in data make[2]: Entering directory `/var/tmp/portage/gnome-extra/gnome-games-2.22.3/work/gnome-games-2.22.3/gnect/data' make[3]: Entering directory `/var/tmp/portage/gnome-extra/gnome-games-2.22.3/work/gnome-games-2.22.3/gnect/data' make[3]: Nothing to be done for `install-exec-am'. test -z "/usr/share/applications" || /bin/mkdir -p "/var/tmp/portage/gnome-extra/gnome-games-2.22.3/image//usr/share/applications" /bin/sed -e "s|@VERSION@|2.22.3|g" -e "s|@libexecdir@|/usr/libexec|g" -e "s|@bindir@|/usr/bin|g" -e "s|@ggzexecmoddir@|/usr/lib/ggz|g"< gnect-client.dsc.in > gnect-client.dsc test -z "" || /bin/mkdir -p "/var/tmp/portage/gnome-extra/gnome-games-2.22.3/image/" /usr/bin/install -c -m 644 'gnect.desktop' '/var/tmp/portage/gnome-extra/gnome-games-2.22.3/image//usr/share/applications/gnect.desktop' test -z "" || /bin/mkdir -p "/var/tmp/portage/gnome-extra/gnome-games-2.22.3/image/" test -z "/etc/gconf/schemas" || /bin/mkdir -p "/var/tmp/portage/gnome-extra/gnome-games-2.22.3/image//etc/gconf/schemas" test -z "/usr/share/gnect" || /bin/mkdir -p "/var/tmp/portage/gnome-extra/gnome-games-2.22.3/image//usr/share/gnect" GCONF_CONFIG_SOURCE=xml:merged:/etc/gconf/gconf.xml.defaults /usr/bin/gconftool-2 --makefile-install-rule ../../gnect/data/gnect.schemas /usr/bin/install -c -m 644 'gnect.schemas' '/var/tmp/portage/gnome-extra/gnome-games-2.22.3/image//etc/gconf/schemas/gnect.schemas' GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL is set, not installing schemas /usr/bin/ggz-config --noregistry="/usr/share/ggz/modules" -D --install --modfile=gnect-client.dsc --force /usr/bin/install -c -m 644 'white_ob.cn4.gz' '/var/tmp/portage/gnome-extra/gnome-games-2.22.3/image//usr/share/gnect/white_ob.cn4.gz' Preserving gnect-client.dsc as /Gnect.module.dsc... ACCESS DENIED open_wr: /Gnect.module.dsc File cannot be written to (/Gnect.module.dsc) make[3]: *** [install-data-local] Error 255 make[3]: Leaving directory `/var/tmp/portage/gnome-extra/gnome-games-2.22.3/work/gnome-games-2.22.3/gnect/data' make[2]: *** [install-am] Error 2 make[2]: Leaving directory `/var/tmp/portage/gnome-extra/gnome-games-2.22.3/work/gnome-games-2.22.3/gnect/data' make[1]: *** [install-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/gnome-extra/gnome-games-2.22.3/work/gnome-games-2.22.3/gnect' make: *** [install-recursive] Error 1 * * ERROR: gnome-extra/gnome-games-2.22.3 failed. * Call stack: * ebuild.sh, line 49: Called src_install * environment, line 3303: Called gnome2_src_install * environment, line 2504: Called die * The specific snippet of code: * emake DESTDIR="${D}" "scrollkeeper_localstate_dir=${D}${sk_tmp_dir} " "$@" install || die "install failed"; * The die message: * install failed * * 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/gnome-extra/gnome-games-2.22.3/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/gnome-extra/gnome-games-2.22.3/temp/environment'. * --------------------------- ACCESS VIOLATION SUMMARY --------------------------- LOG FILE = "/var/log/sandbox/sandbox-29945.log" open_wr: /Gnect.module.dsc -------------------------------------------------------------------------------- * Messages for package gnome-extra/gnome-games-2.22.3: * * ERROR: gnome-extra/gnome-games-2.22.3 failed. * Call stack: * ebuild.sh, line 49: Called src_install * environment, line 3303: Called gnome2_src_install * environment, line 2504: Called die * The specific snippet of code: * emake DESTDIR="${D}" "scrollkeeper_localstate_dir=${D}${sk_tmp_dir} " "$@" install || die "install failed"; * The die message: * install failed * * 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/gnome-extra/gnome-games-2.22.3/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/gnome-extra/gnome-games-2.22.3/temp/environment'. * --- There's a suspicious message: "GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL is set, not installing schemas" Then it breaks here: "Preserving gnect-client.dsc as /Gnect.module.dsc... ACCESS DENIED open_wr: /Gnect.module.dsc File cannot be written to (/Gnect.module.dsc)" Reproducible: Always Steps to Reproduce: Although I'm using an experimental Hardened toolchain, I don't think it's related to that. It dies in the same way on another box as well. emerge --info: Portage 2.1.4.4 (hardened/x86/2.6, gcc-4.2.4, glibc-2.7-r3, 2.6.26-hardened-r1 i686) ================================================================= System uname: 2.6.26-hardened-r1 i686 Intel(R) Pentium(R) M processor 1.60GHz Timestamp of tree: Sat, 13 Sep 2008 17:00:02 +0000 ccache version 2.4 [disabled] app-shells/bash: 3.2_p33 dev-java/java-config: 1.3.7, 2.1.6 dev-lang/python: 2.5.2-r7 dev-python/pycrypto: 2.0.1-r6 dev-util/ccache: 2.4-r7 sys-apps/baselayout: 1.12.11.1 sys-apps/sandbox: 1.2.18.1-r2 sys-devel/autoconf: 2.13, 2.61-r2 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1 sys-devel/binutils: 2.18-r4 sys-devel/gcc-config: 1.4.0-r4 sys-devel/libtool: 1.5.26 virtual/os-headers: 2.6.25-r4 ACCEPT_KEYWORDS="x86" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -march=i686 -mtune=pentium-m -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /var/lib/hsqldb" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d" CXXFLAGS="-O2 -march=i686 -mtune=pentium-m -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig distlocks fixpackages metadata-transfer sandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="http://gentoo.inf.elte.hu/ http://gentoo.inode.at/" LANG="hu_HU.utf8" LC_ALL="hu_HU.utf8" LINGUAS="hu en" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage /usr/portage/local/layman/xake-toolchain /home/atoth/public_html/overlay" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="7zip GNU X X509 Xaw3d a52 aac aalib acl acpi aiglx alsa amr amrnb amrwb aotuv apache2 ares asf audiofile bash-completion bcmath bdf berkdb bidi binfilter bitmap-fonts bittorrent blas bluetooth boost branding browserplugin bzip2 cairo caps cblas cdda cddb cdparanoia cdr cdrom chardet checkpath cli contrib cracklib crypt css cups curl dba dbm dbus dcmtk devhelp dga dhcp dia dicom discard-path divx divx4linux djbfft djvu dlloader dmi dri dts dv dvd dvdnav dvdr dvdread dvi eds emerald encode epiphany evo exif expat extensions extrafilters fam fame ffmpeg fftw finger firefox flac flash flatfile fontconfig foomaticdb force-cgi-redirect fortran fpx ftp gcdmaster gd gdb gdl gif gimp gimpprint ginac glade glibc glitz gmedia gmp gnet gnome gnome-keyring gnome-print gnomecanvas gnomecd gopher gpac gphoto2 gpm graphviz gs gsl gsm gstreamer gtk gtk2 gtkhtml guile hal hardened hub i8x0 iconv icu id3tag idea idn imagemagick imap imlib inherit-graph inkjar irda jabber java javascript jingle jpeg jpeg2k jrtplib ladspa lame lapack lcms libburn libcaca libnotify libplot libsamplerate libssh2 lm_sensors log4j logitech-mouse loop-aes lzma lzo lzw m17n-lib mad matroska mbox mcal md5sum memlimit midi mikmod mjpeg mmap mmx mng mode-owner motif mozbranding mozcalendar mp2 mp3 mp4 mpeg mpeg1 mpeg2 mplayer mudflap musepack mysql mysqli nautilus ncurses network networking nifti nls nopop3d nptl nptlonly nsplugin nss ntfs nuv oav odbc odk ofx ogg oggvorbis ogm oil onaccess openexr opengl pam pam_chroot pam_timestamp pango pccts pcmcia pda pdf pear perl php pic plotutils png pnm posix postscript ppds python qhull quicktime quotas rar rc5 readline real realmedia reiserfs remote replytolist rle rtc samba sasl scanner scenarios screen sdl sensord session sftplogging sid skins slang smp sms sndfile soap sockets sound soundtouch sourceview sox speex spell spf srt sse sse2 ssl subtitles subversion svg syslog sysvipc t1lib tagwriting tcl tcltk tcpd tetex tga theora threads threadsafe tiff tk tlen tokenizer toolbar tools topal totem transcode truetype truetype-fonts twolame type1-fonts udev underscores unicode urandom usb userlocales v4l v4l2 valgrind vcd vidix virus-scan vista visualization vlm volpack vorbis vtk wavplay webdav wifi win32codecs wma wmf wmp wxwindows x264 x86 xattr xforms xine xmedcon xml xml2 xmlrpc xorg xpm xsl xv xvid yahoo zip zlib zvbi" ALSA_CARDS="intel8x0" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CAMERAS="ptp2" ELIBC="glibc" INPUT_DEVICES="keyboard mouse acecad" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="hu en" USERLAND="GNU" VIDEO_CARDS="i810 i830 v4l" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Created attachment 171495 [details, diff] fix for ggz-config (from ggz-client-libs) for $DESTDIR support fix a string management bug (possibly related to a hardened toolchain?) that causes ggz-config to write files outside of $DESTDIR even when using the -D switch to install.
The bug is actually in ggz-config, which Gnect uses to manage its data. It has a switch for its --install mode that instructs it to install relative to $DESTDIR. But it attempts to use sprintf to print a string onto itself; I dunno if its related to having a hardened compiler/linker or not but that leaves the whole pathname empty and the file gets written to /. The attached patch applied to dev-games/ggz-client-libs should fix it.
(In reply to comment #2) > The bug is actually in ggz-config, which Gnect uses to manage its data. It has > a switch for its --install mode that instructs it to install relative to > $DESTDIR. But it attempts to use sprintf to print a string onto itself; I > dunno if its related to having a hardened compiler/linker or not but that > leaves the whole pathname empty and the file gets written to /. > > The attached patch applied to dev-games/ggz-client-libs should fix it. > Thanks for pointing this out! Using sprintf to print onto itself is probably not the safest way of managing things. I suspect FORTIFY_SOURCE may be the hardened component to blame for this issue. Although it's better to correct the application like you did, despite the fact that this happens only at compile-time. I give a feedback on how it went. BTW, is that patch is planned to be included in ggz-client-libs? It may worth to report this upstreams. Regards, Dw.
(In reply to comment #3) > (In reply to comment #2) > > The bug is actually in ggz-config, which Gnect uses to manage its data. > > Thanks for pointing this out! > > I give a feedback on how it went. > > Regards, > Dw. > Thanks for tracking this down, again. I can confirm, that your patch solves the problem. Regards, Dw.
Created attachment 171957 [details] Modified ebuild applies Michael Edenfield's patch
(In reply to comment #5) > Created an attachment (id=171957) [edit] > Modified ebuild applies Michael Edenfield's patch > Patch and modified ebuild worked for me on amd64.
in portage. I didn't rev bump the ebuild since it doesn't seem to affect the non-hardened case which is more common. If you're affected by this bug, re-emerge ggz-client-libs-0.0.14.1 to get the patch.
(In reply to comment #7) > in portage. > > I didn't rev bump the ebuild since it doesn't seem to affect the non-hardened > case which is more common. > > If you're affected by this bug, re-emerge ggz-client-libs-0.0.14.1 to get the > patch. > Hi, thanks a lot for this solution. I emerged --sync but the ebuild doesn't applies the patch, only if I use the ebuild attached here. Luis
the "hardened" stuff in question i'm pretty sure is just gcc-4.3.3. so a revbump should be done here.
*** Bug 257242 has been marked as a duplicate of this bug. ***