eix-sync requires UID 0 in order to run, unless I pass the -e argument. Like portage, it should understand a different UID as the super user (for the Prefix installation). The work-around is to create the eix-sync configuration file as suggested by the eix-sync error output and write "-e" in it. Reproducible: Always Steps to Reproduce: 1. Execute prefixed eix-sync as a normal user. ~ $ emerge --info Portage 2.2.01.18252-prefix (prefix/darwin/macos/10.6/x64, gcc-4.2.1, unavailable, 10.7.0 i386) ================================================================= System uname: Darwin-10.7.0-i386-64bit Timestamp of tree: Thu, 21 Apr 2011 11:39:37 +0000 distcc 3.1-toolwhip.1 i386-apple-darwin10.0 [disabled] app-shells/bash: 4.1_p7 dev-lang/python: 2.7.1-r1 sys-devel/autoconf: 2.68 sys-devel/automake: 1.11.1 sys-devel/gcc-config: 1.4.1-r00.2 sys-devel/libtool: 2.4-r1 sys-devel/make: 3.82 virtual/os-headers: 0 Repositories: gentoo_prefix Installed sets: ACCEPT_KEYWORDS="~x64-macos" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-apple-darwin10" CFLAGS="-O2 -pipe -march=nocona" CHOST="x86_64-apple-darwin10" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/portage /etc/terminfo" CXXFLAGS="-O2 -pipe -march=nocona" DISTDIR="/Users/jacob/Gentoo/usr/portage/distfiles" FEATURES="assume-digests binpkg-logs collision-protect distlocks fixlafiles fixpackages news nostrip parallel-fetch preserve-libs protect-owned sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch" FFLAGS="" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="en_US.UTF-8" LDFLAGS="-Wl,-dead_strip_dylibs" MAKEOPTS="-j2" PKGDIR="/Users/jacob/Gentoo/usr/portage/packages" PORTAGE_CONFIGROOT="/Users/jacob/Gentoo/" 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="/Users/jacob/Gentoo/var/tmp" PORTDIR="/Users/jacob/Gentoo/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.prefix.freens.org/gentoo-portage-prefix" USE="aqua coreaudio cracklib cxx faac faad mmx mmxext modules mp3 ncurses nls objc objc++ prefix readline sse sse2 ssl theora unicode vorbis x264 x64-macos xvid zlib" 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 cgi cgid 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" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="Darwin" 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="keyboard mouse" KERNEL="Darwin" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" 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, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Created attachment 270781 [details, diff] eix-0.22.8.ebuild.patch Suggested fix: configure "root" UID via portage's constants, which is aware of Prefix's super-user UID.
Created attachment 270783 [details, diff] eix-rootuid.patch
Acceptable idea. Another option is that we could just install the config file for prefix only if it isn't accepted upstream.
(In reply to comment #3) > Acceptable idea. Another option is that we could just install the config file > for prefix only if it isn't accepted upstream. How do I push this upstream?
(In reply to comment #4) > (In reply to comment #3) > > Acceptable idea. Another option is that we could just install the config file > > for prefix only if it isn't accepted upstream. > > How do I push this upstream? I assigned this bug to upstream author of eix ;)
I would like to avoid the dependency on python and portage. Would it be sufficient to add a ./configure option to pass the ROOT_UID during compilation from the ebuild or _must_ the test be done at runtime?
(In reply to comment #6) > I would like to avoid the dependency on python and portage. > Would it be sufficient to add a ./configure option to pass the ROOT_UID > during compilation from the ebuild or _must_ the test be done at runtime? To be 100% correct, (to my surprise) the expression in the Makefile is evaluated during compilation, and results are hard-coded into the eix-sync binary. Using ./configure to set the ROOT_UID was my first idea as well, but since I do not understand autotools' bracket-happy language just yet, and since I saw the Makefile also being used for configure-like operations, I went with the Makefile option instead. I will attempt to write a different patch but no guarantees on that contribution coming sooner rather than later.
(In reply to comment #6) > I would like to avoid the dependency on python and portage. > Would it be sufficient to add a ./configure option to pass the ROOT_UID > during compilation from the ebuild or _must_ the test be done at runtime? Yup, we do that in the portage ebuilds themselves. Example, something like: PORTAGE_ROOT_USER=$(python -c 'from portage.const import rootuser; print rootuser') <...> --with-root-user="${PORTAGE_ROOT_USER}" \ Obviously, different for user vs uid. Just saying it has been done before.
Created attachment 270877 [details, diff] eix-0.22.8.ebuild.patch Here's a different version. This time, the UID is retrieved in the ebuild and passed to configure, then to Makefile, then hard-coded into eix-sync.
Created attachment 270879 [details, diff] eix-rootuid.patch I did this by example, so please review the configure patch particularly critically, as it may give the appearance of looking consistent and correct but not actually be so.
Thanks for the patch. I added an extended version to the eix svn trunk (>=eix-0.22.9): In your patch, AC_DEFINE_UNQUOTED(...) would be too much, because this defines constants for the C++ code in config.h However, I guess that the ROOT_UID should also be used for the ad-hoc sanity checks of eix-update, so I left it there and modified eix-update corrsepondingly. Since it is now in C++ anyway, I decided to make ROOT_UID a "real" eix variable which can be modified by the user after installation. Consequently, I renamed the ./configure option into --with-root-uid-default since now it only sets the default for ROOT_UID.
app-portage/eix-0.22.9 is in the tree
This is one of my favorite Bugzilla experiences; you guys are awesome. Thanks for the patience and interactions. :)