Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 390143 - dev-libs/glib-2.30.1-r1 misses /var/lib/dbus/machine-id of sys-apps/dbus-1.4.16-r2, breaks app-text/evince-2.32.0-r3
Summary: dev-libs/glib-2.30.1-r1 misses /var/lib/dbus/machine-id of sys-apps/dbus-1.4....
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-11 01:20 UTC by Ewgenij Starostin
Modified: 2011-11-12 17:31 UTC (History)
3 users (show)

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


Attachments
Hardcode /etc/machine-id instead of /var/lib/dbus/machine-id in glib. (glib-2.30.1-machine-id.patch,753 bytes, text/plain)
2011-11-11 01:26 UTC, Ewgenij Starostin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ewgenij Starostin 2011-11-11 01:20:54 UTC
This is probably the same issue as bug 390011, but that one’s closed and didn’t name the right package for the issue either.

sys-apps/dbus-1.4.16-r2, with the supplied init script, puts machine-id in /etc. It used to be in /var/lib/dbus. glib-2.30.1/gio/gdbusprivate.c has the latter path hard-coded.

$ ls -l /etc/machine-id 
-rw-r--r-- 1 root root 33 Nov  1 13:22 /etc/machine-id
$ ls -l /var/lib/dbus/machine-id
ls: cannot access /var/lib/dbus/machine-id: No such file or directory

When starting evince, it complains to stderr about the missing machine-id:

Failed to get bus connection: Cannot spawn a message bus without a machine-id: Unable to load /var/lib/dbus/machine-id: Failed to open file '/var/lib/dbus/machine-id': No such file or directory

If there was no PDF file given on the command line, it also prints:

GConf Error: Failed to contact configuration server; the most common cause is a missing or misconfigured D-Bus session bus daemon. See http://projects.gnome.org/gconf/ for information. (Details -  1: Failed to get connection to session: Cannot spawn a message bus without a machine-id: Unable to load /var/lib/dbus/machine-id: Failed to open file '/var/lib/dbus/machine-id': No such file or directory)

If no PDF file was given, an empty evince window comes up, but attempting to load a file does nothing (after selecting one from the file choosing window). If a PDF file was given, no window comes up and evince hangs. (I didn’t get a meaningful backtrace or ltrace for this yet.)

It works fine if glib is recompiled with the path changed to /etc/machine-id. I have no idea of what’s going on inside evince that depends on this, but, hey, the path in glib might as well be correct. So the following patch is helpful with a recent dbus version. (Note: probably counter-productive with *old* dbus, before whenever the machine-id path changed.)

Custom USE flags in addition to the emerge --info output: -doc for glib (owing to bug 387385), nothing for evince or dbus.

Reproducible: Always

Steps to Reproduce:
1. evince blankpdf.pdf   # (Or any other PDF file.)
Actual Results:  
Errors on stderr, no evince window, evince process keeps running.

Expected Results:  
Show the PDF file.

$ emerge --info
Portage 2.1.10.33 (default/linux/amd64/10.0, gcc-4.5.3, glibc-2.13-r4, 3.0.7-tuxonice x86_64)
=================================================================
System uname: Linux-3.0.7-tuxonice-x86_64-Intel-R-_Core-TM-2_CPU_T5600_@_1.83GHz-with-gentoo-2.1
Timestamp of tree: Thu, 10 Nov 2011 21:45:01 +0000
app-shells/bash:          4.2_p10
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.2-r3, 3.2.2
dev-util/cmake:           2.8.6-r3
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1
sys-apps/openrc:          0.9.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.1-r1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.5.3-r1
sys-devel/gcc-config:     1.4.1-r1
sys-devel/libtool:        2.4-r4
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 2.6.39 (virtual/os-headers)
sys-libs/glibc:           2.13-r4
Repositories: gentoo x11 x-portage x-gentoo-soor-overlay-spr x-pidgin
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O3 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /usr/share/openvpn/easy-rsa /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=nocona -O3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs candy collision-protect distlocks ebuild-locks fixlafiles installsources metadata-transfer news nostrip parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox"
FFLAGS=""
GENTOO_MIRRORS="http://ftp.spline.inf.fu-berlin.de/mirrors/gentoo/"
LANG="en_GB.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-O1"
LINGUAS="en_GB en de"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
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/layman/x11 /usr/local/portage /usr/local/portage/local/gentoo-soor-overlay-spr /usr/local/portage/local/pidgin"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3ds 7zip X X509 a52 aac aalib abook ace acl acpi additions aim alisp alsa amd64 amr ansi apache2 arj artworkextra asf async audiofile auth bash-completion bcmath berkdb bidi binfilter blender-game bluetooth bonusscripts boost bugzilla bzip2 cairo cal3d calendar cardbus cddb cdparanoia chipcard chipcard2 chm cjk cli clutter color-console colordiff consolekit cracklib crypt cscope css ctype cups curl curlwrappers cxx cyrillic dbase dbm dbus dbx devhelp dga dhcp dia divx djvu dns doc dri dts dv dvd dvdnav dvdr dvdread eap-tls ecc effects enca encode erandom examples exif extensions extra extrafilters fame fbcon fbsplash ffmpeg fftw figlet filter finger firefox flac flash flatfile fltk fluidsynth fontconfig foomaticdb fortran fpx ftp fts3 fuse games gcc-libffi gcj gconf gcrypt gd gdbm geldkarte geoip gif gimp gimpprint ginac git glade glep glgd glib glibc-omitfp glitz glut gmedia gmp gnuplot gnutls gopher gpg gpgme gphoto2 gpm graphics graphviz gs gsl gsm gstreamer gtk gtk2 guile h323 hash hbci hddtemp hdri hfs html humanities i8x0 iconv icq icu id3 id3tag idea idn imagemagick imap imlib immqt inkjar inotify insecure-savers intl ipod ipv6 ipw3945 irda iso14755 ithreads jabber java jce jingle john jpeg jpeg2k json kdrive kerberos keyscrub kpathsea kqemu ladspa lame laptop lash latex lcms ldap ldap-sasl libcaca libdsk libnotify libsamplerate libsexy libv4l libv4l2 libwww lightning lights linuxthreads-tls live lm_sensors logrotate lua lzo lzw m17n-lib math matroska mbox mcal mccp md5sum meanwhile mhash mime mimencode ming mjpeg mmap mmx mmxext mng modules mozbranding mozdevelop mozembed mozilla moznocompose moznoirc moznomail mozsvg mp2 mp3 mp3rtp mp4 mp4live mpeg mpeg2 mplayer mpm-worker msn mudflap multilib musepack mysql mysqli ncurses net nethack network networking new-interface nfconntrack nfs nis nls nntp nodrm normalizemime nptl nptlonly nsplugin ntlm offensive ofx ogg on-the-fly-crypt openal openct openexr opengl openmp oscar overload pam pango passwordsave pcap pcmcia pcntl pcre pda pdf pdo perl php pipechan player plotutils png pnm posix pppd print pstricks publishers python python3 qt3support quicktime rar readline realmedia reflection regex resolvconf rle rtc rtsp ruby scanner schroedinger science sdl secure-delete sensord session sharedext shorten sift silc simplexml sip sipim slang smartcard smime smp smtp sndfile soap sockets sound sox speex spell spl sqlite sqlite3 sse sse2 sse3 ssl ssse3 subtitles subversion suhosin svg svgz sysfs syslog sysvipc t1lib tcpd tetex tga theora threads threadsafe tidy tiff tokenizer truetype type1 type3 ucs4 unicode upnp usb utils v4l v4l2 vamp vcd verse video vim vim-syntax vorbis vorbis-psy wav wavpack webkit wifi wma wmf wmp x264 xanim xcb xchatdccserver xcomposite xetex xface xforms xim xinetd xml xmlreader xmlrpc xmlwriter xorg xosd xplanet xpm xprint xrandr xscreensaver xsl xslt xulrunner xv xvid xvmc yahoo yv12 zip zlib" ALSA_CARDS="hda-intel usb-audio" 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 auth_digest authn_anon authn_dbd 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 dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev keyboard synaptics mouse wacom" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_GB en de" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="intel" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Ewgenij Starostin 2011-11-11 01:26:25 UTC
Created attachment 292171 [details]
Hardcode /etc/machine-id instead of /var/lib/dbus/machine-id in glib.

This fixes this issue for me, but it’d break things for people whose dbus init script puts machine-id in /var/lib/dbus.
Comment 2 Cédric Jeanneret 2011-11-11 13:21:49 UTC
Can confirm that - firefox complains about the missins /var/lib/dbus/machine-id file.

As a workaround, you can run this command:
sudo dbus-uuidgen --ensure=/var/lib/dbus/machine-id

Would be nice if this bug is corrected asap, it's a bit lame having applications complaining about that (some don't even start, as "revelation" password manager - you can imagine the mess while using it at office....)

Thank you.

cheers,

C.
Comment 3 Samuli Suominen (RETIRED) gentoo-dev 2011-11-11 17:39:44 UTC
Should be set in tree with glib-2.30.1-r2 and proper blockers in place to enforce this.
Comment 4 Samuli Suominen (RETIRED) gentoo-dev 2011-11-12 17:31:50 UTC
Upstream ticket:

http://bugzilla.gnome.org/show_bug.cgi?id=663928