Some notes on ROOT: * The idea behind ROOT is that one can build a system with ROOT=/somewhere and then chroot into it or tar up /somewhere as a system image. It is not designed to allow the user to run /somewhere/usr/bin/foo. * ROOT can't be used correctly in src_*, since ROOT might be different when merging a binary package. For example, a binary package might be built with ROOT=/ and then installed onto a system using ROOT=/somewhere. * ROOT isn't used for library dependencies. When building, libraries, headers etc. on / have to be used. Cross-compiling etc is done by configuring the toolchain correctly, not by hacking ebuilds in a way that breaks binary packages. Ebuilds in mail-* and media-* that appear to get this wrong will be pasted into comments, since the list is too long for a single place. Summary of all mentioned herds: fonts gnome media-tv net-mail no-herd qmail sound video x11-drivers Summary of all mentioned maintainers: <allanonjl@gentoo.org> <liquidx@gentoo.org> <maintainer-needed@gentoo.org> <media-video@gentoo.org> <st_lim@gentoo.org> <x11-drivers@gentoo.org> <zzam@gentoo.org> Alexis Ballier <aballier@gentoo.org> Alin Nastac <mrness@gentoo.org> Eldad Zack <eldad@gentoo.org> Gentoo VDR Project <vdr@gentoo.org> Michael Hanselmann <hansmi@gentoo.org> Michal Januszewski <spock@gentoo.org> Robin H. Johnson <robbat2@gentoo.org> Steve Dibb <beandog@gentoo.org> The Gentoo Sound Team <sound@gentoo.org>
QA checks for package directory /mail-client/balsa: /mail-client/balsa/balsa-2.0.15-r2.ebuild 48: export GPGME_CONFIG=${ROOT}/usr/bin/gpgme3-config 49: if [ -x ${ROOT}/usr/bin/gpg ]; 51: export GPG_PATH=${ROOT}/usr/bin/gpg 52: elif [ -x ${ROOT}/usr/bin/gpg2 ]; 54: export GPG_PATH=${ROOT}/usr/bin/gpg2 herds: gnome maintainer: <allanonjl@gentoo.org> QA checks for package directory /mail-filter/anubis: /mail-filter/anubis/anubis-3.9.95.ebuild 45: if [ -x ${ROOT}/usr/bin/gpg2 ]; 47: GPG=${ROOT}/usr/bin/gpg2 49: GPG=${ROOT}/usr/bin/gpg herds: net-mail QA checks for package directory /mail-filter/dspam: /mail-filter/dspam/dspam-3.6.8-r2.ebuild 199: if [[ -f "${ROOT}${CONFDIR}/mysql.data" ]]; then 200: DSPAM_DB_DATA=( $(sed "s:^[\t ]*$:###:gI" "${ROOT}${CONFDIR}/mysql.data") ) 241: if [ -f ${ROOT}${CONFDIR}/pgsql.data ]; then 242: DSPAM_DB_DATA=( $(cat "${ROOT}${CONFDIR}/pgsql.data") ) 278: if [ -f ${ROOT}${CONFDIR}/oracle.data ]; then 279: DSPAM_DB_DATA=( $(cat "${ROOT}${CONFDIR}/oracle.data") ) herds: net-mail maintainer: Alin Nastac <mrness@gentoo.org> maintainer: <st_lim@gentoo.org> QA checks for package directory /mail-filter/spamassassin-ruledujour: /mail-filter/spamassassin-ruledujour/spamassassin-ruledujour-20050106.ebuild 47: if [ -f "${ROOT}/etc/cron.daily/myrulesdujour" ]; then /mail-filter/spamassassin-ruledujour/spamassassin-ruledujour-20050822.ebuild 47: if [ -f "${ROOT}/etc/cron.daily/myrulesdujour" ]; then /mail-filter/spamassassin-ruledujour/spamassassin-ruledujour-20051123.ebuild 47: if [ -f "${ROOT}/etc/cron.daily/myrulesdujour" ]; then herds: net-mail maintainer: <robbat2@gentoo.org> QA checks for package directory /mail-mta/netqmail: /mail-mta/netqmail/netqmail-1.05-r4.ebuild 210: if [[ ! -f ${ROOT}${i} ]]; then /mail-mta/netqmail/netqmail-1.05-r5.ebuild 220: if [[ ! -f ${ROOT}${i} ]]; then herds: qmail maintainer: Michael Hanselmann <hansmi@gentoo.org> QA checks for package directory /mail-mta/qmail: /mail-mta/qmail/qmail-1.03-r15.ebuild 344: if [ ! -f ${ROOT}/var/qmail/alias/.qmail-${i} ]; then /mail-mta/qmail/qmail-1.03-r16.ebuild 411: if [[ ! -f ${ROOT}/var/qmail/alias/.qmail-${i} ]]; then herds: qmail maintainer: Robin H. Johnson <robbat2@gentoo.org> QA checks for package directory /mail-mta/qmail-ldap: /mail-mta/qmail-ldap/qmail-ldap-1.03-r1.ebuild 165: if [ ! -d ${ROOT}/var/qmail/alias/.maildir ] ; then /mail-mta/qmail-ldap/qmail-ldap-1.03-r2.ebuild 161: if [ ! -d ${ROOT}/var/qmail/alias/.maildir ] ; then /mail-mta/qmail-ldap/qmail-ldap-1.03-r3.ebuild 157: if [ ! -f ${ROOT}/var/qmail/alias/.qmail-${i} ]; then /mail-mta/qmail-ldap/qmail-ldap-1.03-r4.ebuild 170: if [ ! -f ${ROOT}/var/qmail/alias/.qmail-${i} ]; then herds: qmail maintainer: Robin H. Johnson <robbat2@gentoo.org> QA checks for package directory /mail-mta/qmail-mysql: /mail-mta/qmail-mysql/qmail-mysql-1.03-r13.ebuild 256: if [ ! -f ${ROOT}/var/qmail/alias/.qmail-${i} ]; then /mail-mta/qmail-mysql/qmail-mysql-1.03.ebuild 148: if [ ! -d ${ROOT}/var/qmail/alias/.maildir ] ; then herds: qmail QA checks for package directory /media-fonts/artwiz-fonts: /media-fonts/artwiz-fonts/artwiz-fonts-2.4-r3.ebuild 39: if [ -f ${ROOT}/etc/X11/fs/config -a -z "$(grep artwiz /etc/X11/fs/config)" ] herds: fonts
QA checks for package directory /media-gfx/bootsplash: /media-gfx/bootsplash/bootsplash-0.6.1-r7.ebuild 67: if [ ! -e ${ROOT}/etc/bootsplash/default ]; then herds: no-herd maintainer: Michal Januszewski <spock@gentoo.org> QA checks for package directory /media-gfx/splash-themes-gentoo: /media-gfx/splash-themes-gentoo/splash-themes-gentoo-20050429.ebuild 20: if [ ! -e ${ROOT}/etc/splash/default ]; then herds: no-herd maintainer: <spock@gentoo.org> QA checks for package directory /media-gfx/splashutils: /media-gfx/splashutils/splashutils-1.3-r2.ebuild 79: if [[ ! -e ${ROOT}/usr/$(get_libdir)/klibc/include/linux/console_splash.h ]]; then 113: if [[ ! -e ${ROOT}/usr/$(get_libdir)/klibc/include/linux/console_splash.h ]]; then /media-gfx/splashutils/splashutils-1.3-r3.ebuild 79: if [[ ! -e ${ROOT}/usr/$(get_libdir)/klibc/include/linux/console_splash.h ]]; then 116: if [[ ! -e ${ROOT}/usr/$(get_libdir)/klibc/include/linux/console_splash.h ]]; then herds: no-herd maintainer: <spock@gentoo.org> QA checks for package directory /media-libs/SoQt: /media-libs/SoQt/SoQt-1.3.0.ebuild 23: econf --with-coin --disable-html-help $(use_enable doc html) htmldir=${ROOT}usr/share/doc/${PF}/html maintainer: <maintainer-needed@gentoo.org> QA checks for package directory /media-libs/coin: /media-libs/coin/coin-2.4.5.ebuild 62: econf ${myconf} htmldir=${ROOT}usr/share/doc/${PF}/html || die "econf failed" herds: no-herd maintainer: <maintainer-needed@gentoo.org> QA checks for package directory /media-libs/libgphoto2: /media-libs/libgphoto2/libgphoto2-2.2.1-r1.ebuild 155: eerror "Unable to find ${ROOT}/usr/$(get_libdir)/libgphoto2/print-camera-list" /media-libs/libgphoto2/libgphoto2-2.3.1-r2.ebuild 144: eerror "Unable to find ${ROOT}/usr/$(get_libdir)/libgphoto2/print-camera-list" /media-libs/libgphoto2/libgphoto2-2.3.1-r3.ebuild 144: eerror "Unable to find ${ROOT}/usr/$(get_libdir)/libgphoto2/print-camera-list" herds: gnome maintainer: <liquidx@gentoo.org> maintainer: <zzam@gentoo.org> QA checks for package directory /media-libs/libmpeg3: /media-libs/libmpeg3/libmpeg3-1.5.2-r3.ebuild 57: sed -i -e "/LIBS = /s:$: -L\${ROOT}usr/$(get_libdir) -la52:" Makefile /media-libs/libmpeg3/libmpeg3-1.7.ebuild 69: cd "${D}/${ROOT}/usr/include/libmpeg3" herds: video maintainer: Alexis Ballier <aballier@gentoo.org> maintainer: <media-video@gentoo.org> QA checks for package directory /media-libs/libnjb: /media-libs/libnjb/libnjb-1.2.ebuild 42: cp ${ROOT}/etc/hotplug/usb.usermap ${D}/etc/hotplug/usb.usermap herds: sound QA checks for package directory /media-plugins/vdr-burn: /media-plugins/vdr-burn/vdr-burn-0.0.9-r2.ebuild 51: if grep -q "virtual cString Active" ${ROOT}/usr/include/vdr/plugin.h; then /media-plugins/vdr-burn/vdr-burn-0.0.9-r3.ebuild 51: if grep -q "virtual cString Active" ${ROOT}/usr/include/vdr/plugin.h; then herds: media-tv maintainer: Gentoo VDR Project <vdr@gentoo.org> QA checks for package directory /media-plugins/vdr-ffnetdev: /media-plugins/vdr-ffnetdev/vdr-ffnetdev-0.1.0.ebuild 23: if grep -q "virtual cString Active" ${ROOT}/usr/include/vdr/plugin.h; then herds: media-tv maintainer: Gentoo VDR Project <vdr@gentoo.org> QA checks for package directory /media-plugins/vdr-streamdev-server: /media-plugins/vdr-streamdev-server/vdr-streamdev-server-0.3.3_pre20060502.ebuild 30: if grep -q "virtual bool Active" ${ROOT}/usr/include/vdr/plugin.h; then /media-plugins/vdr-streamdev-server/vdr-streamdev-server-0.3.3_pre20061206.ebuild 33: #if grep -q "virtual bool Active" ${ROOT}/usr/include/vdr/plugin.h; then herds: media-tv maintainer: Gentoo VDR Project <vdr@gentoo.org> QA checks for package directory /media-sound/albumart: /media-sound/albumart/albumart-1.6.0.ebuild 25: python setup.py install --root=${D} --prefix=${ROOT}usr || die herds: sound
QA checks for package directory /media-sound/hydrogen: /media-sound/hydrogen/hydrogen-0.9.2.ebuild 48: export PORTAUDIOPATH="${ROOT}usr" 50: # export PORTMIDIPATH="${ROOT}usr" /media-sound/hydrogen/hydrogen-0.9.3-r1.ebuild 51: export PORTAUDIOPATH="${ROOT}usr" 53: # export PORTMIDIPATH="${ROOT}usr" /media-sound/hydrogen/hydrogen-0.9.3.ebuild 50: export PORTAUDIOPATH="${ROOT}usr" 52: # export PORTMIDIPATH="${ROOT}usr" herds: sound maintainer: Eldad Zack <eldad@gentoo.org> QA checks for package directory /media-sound/mt-daapd: /media-sound/mt-daapd/mt-daapd-0.3.0_pre1376.ebuild 77: --with-ffmpeg-includes=${ROOT}/usr/include/ffmpeg \ herds: sound QA checks for package directory /media-sound/rosegarden: /media-sound/rosegarden/rosegarden-1.2.4.ebuild 34: local myconf="kdeincludes=$(kde-config --prefix)/include prefix=${ROOT}/usr" /media-sound/rosegarden/rosegarden-1.4.0.ebuild 34: local myconf="kdeincludes=$(kde-config --prefix)/include prefix=${ROOT}/usr" herds: sound maintainer: The Gentoo Sound Team <sound@gentoo.org> QA checks for package directory /media-tv/gentoo-vdr-scripts: /media-tv/gentoo-vdr-scripts/gentoo-vdr-scripts-0.3.7.ebuild 59: [[ -d ${ROOT}/${VDR_HOME}/${testd} ]] && MAKE_VIDEO_DIR=0 /media-tv/gentoo-vdr-scripts/gentoo-vdr-scripts-0.3.8.ebuild 59: [[ -d ${ROOT}/${VDR_HOME}/${testd} ]] && MAKE_VIDEO_DIR=0 herds: media-tv maintainer: Gentoo VDR Project <vdr@gentoo.org> QA checks for package directory /media-tv/wis-go7007: /media-tv/wis-go7007/wis-go7007-0.9.8.ebuild 57: dodir ${ROOT}/lib/modules 58: insinto ${ROOT}/lib/modules 65: insinto ${ROOT}/lib/firmware 67: insinto ${ROOT}/lib/firmware/ezusb 69: insinto ${ROOT}/etc/udev/rules.d 72: exeinto ${ROOT}/usr/bin herds: media-tv maintainer: Steve Dibb <beandog@gentoo.org> QA checks for package directory /media-video/nvidia-settings: /media-video/nvidia-settings/nvidia-settings-1.0.20051122-r3.ebuild 55: ln -snf ${ROOT}/usr/include/X11 include /media-video/nvidia-settings/nvidia-settings-1.0.20060516-r1.ebuild 55: ln -snf ${ROOT}/usr/include/X11 include /media-video/nvidia-settings/nvidia-settings-1.0.20060919.ebuild 51: ln -snf ${ROOT}/usr/include/X11 include /media-video/nvidia-settings/nvidia-settings-1.0.20061102.ebuild 51: ln -snf ${ROOT}/usr/include/X11 include herds: x11-drivers maintainer: <x11-drivers@gentoo.org> QA checks for package directory /media-video/transcode: /media-video/transcode/transcode-1.0.2-r2.ebuild 120: --with-libpostproc-builddir="${ROOT}/usr/$(get_libdir)" \ /media-video/transcode/transcode-1.0.2-r3.ebuild 129: --with-libpostproc-builddir="${ROOT}/usr/$(get_libdir)" \ /media-video/transcode/transcode-1.0.2-r4.ebuild 127: --with-libpostproc-builddir="${ROOT}/usr/$(get_libdir)" \ herds: video maintainer: <media-video@gentoo.org> QA checks for package directory /media-video/vdr: /media-video/vdr/vdr-1.3.36-r3.ebuild 108: if [[ -n "${VDR_LOCAL_PATCHSET}" && -d "${ROOT}/${VDR_LOCAL_PATCHSET}" ]]; then 109: PATCHSET_DIR="${ROOT}/${VDR_LOCAL_PATCHSET}" /media-video/vdr/vdr-1.4.1-r2.ebuild 125: if [[ -n "${VDR_LOCAL_PATCHSET}" && -d "${ROOT}/${VDR_LOCAL_PATCHSET}" ]]; then 127: PATCHSET_DIR="${ROOT}/${VDR_LOCAL_PATCHSET}" /media-video/vdr/vdr-1.4.3.ebuild 125: if [[ -n "${VDR_LOCAL_PATCHSET}" && -d "${ROOT}/${VDR_LOCAL_PATCHSET}" ]]; then 127: PATCHSET_DIR="${ROOT}/${VDR_LOCAL_PATCHSET}" /media-video/vdr/vdr-1.4.4.ebuild 60: if [[ -n "${VDR_LOCAL_PATCHSET}" && -d "${ROOT}/${VDR_LOCAL_PATCHSET}" ]]; then 62: PATCHSET_DIR="${ROOT}/${VDR_LOCAL_PATCHSET}" /media-video/vdr/vdr-1.4.4_p3.ebuild 59: if [[ -n "${VDR_LOCAL_PATCHSET}" && -d "${ROOT}/${VDR_LOCAL_PATCHSET}" ]]; then 61: PATCHSET_DIR="${ROOT}/${VDR_LOCAL_PATCHSET}" /media-video/vdr/vdr-1.4.5.ebuild 59: if [[ -n "${VDR_LOCAL_PATCHSET}" && -d "${ROOT}/${VDR_LOCAL_PATCHSET}" ]]; then 61: PATCHSET_DIR="${ROOT}/${VDR_LOCAL_PATCHSET}" herds: media-tv maintainer: Gentoo VDR Project <vdr@gentoo.org> (that's them all)
CC'ing maintainers. I have not CC'ed maintainers-wanted@ though.
Fixed these: media-libs/libgphoto2 media-video/vdr
video and sound fixed, including libmpeg3 (Alexis's).
vdr stuff fixed.
I don't get it. What is specifically wrong in mail-filter/dspam wrt ROOT usage? 1) src_install : executed only when installed from source; ROOT is used for preserving database settings (the *.data files). 2) pkg_config : since ROOT don't have a portage tree in it, emerge --config cannot be executed in the chrooted environment.
mail-mta/netqmail is fixed
splash stuff fixed.
People, please stop blindly "fixing" ebuilds based on this report. It certainly should not catch pkg_postinst() or pkg_config() stuff, you are actually breaking functionality by removing ${ROOT} usage there. One example here is mail-filter/dspam, the other is mail-filter/spamassassin-ruledujour, didn't check the rest because the output is PITA to read.
(In reply to comment #11) > People, please stop blindly "fixing" ebuilds based on this report. It certainly > should not catch pkg_postinst() or pkg_config() stuff, you are actually > breaking functionality by removing ${ROOT} usage there. And if you look at the examples you gave, it's not flagging anything that appears in either of those functions. In at least those two cases (I haven't checked any others, but those are the ones you said were wrong) the warnings are correct. Code paths that depend upon the contents of $ROOT should be in preinst, postinst or setup, not src_*.
(In reply to comment #12) > And if you look at the examples you gave, it's not flagging anything that > appears in either of those functions. Oh sure it does - this one is pkg_postinst() e.g.: <snip> QA checks for package directory /mail-filter/spamassassin-ruledujour: /mail-filter/spamassassin-ruledujour/spamassassin-ruledujour-20050106.ebuild 47: if [ -f "${ROOT}/etc/cron.daily/myrulesdujour" ]; then </snip> > In at least those two cases (I haven't > checked any others, but those are the ones you said were wrong) the warnings > are correct. Code paths that depend upon the contents of $ROOT should be in > preinst, postinst or setup, not src_*. > and its apparently intended to check for stuff in ${ROOT}, not outside of it... There's nothing correct about the warning.
(In reply to comment #13) > (In reply to comment #12) > > And if you look at the examples you gave, it's not flagging anything that > > appears in either of those functions. > > Oh sure it does - this one is pkg_postinst() e.g.: > > <snip> > QA checks for package directory /mail-filter/spamassassin-ruledujour: > /mail-filter/spamassassin-ruledujour/spamassassin-ruledujour-20050106.ebuild > 47: if [ -f "${ROOT}/etc/cron.daily/myrulesdujour" ]; then > </snip> Nope, line 47 is in src_install. But you're right, better not fix bugs blindly.
do us all a favor and stop "helping"
read the entirely of the spamassassin-ruledujour ebuild. in src_install, if the old version exists in the ROOT, we create the old files to help the user migrate, then during the postinst we spit out a warning at them.
which is wrong src_* should install everything normally (pretend as if nothing had ever been installed) in pkg_preinst, you are then allowed to check $ROOT and move files around in $D to suite upgrade transitions
(In reply to comment #16) > read the entirely of the spamassassin-ruledujour ebuild. > in src_install, if the old version exists in the ROOT, we create the old files > to help the user migrate, then during the postinst we spit out a warning at > them. See point no 2. You can't do this reliably. If a check is needed, do it in pkg_preinst.
(In reply to comment #8) > I don't get it. What is specifically wrong in mail-filter/dspam wrt ROOT usage? > > 1) src_install : executed only when installed from source; ROOT is used for > preserving database settings (the *.data files). Needs to be done in pkg_preinst, to avoid breaking for binary packages. > 2) pkg_config : since ROOT don't have a portage tree in it, emerge --config > cannot be executed in the chrooted environment. Nothing wrong with ROOT in pkg_config. (In reply to comment #13) > Oh sure it does - this one is pkg_postinst() e.g.: > > <snip> > QA checks for package directory /mail-filter/spamassassin-ruledujour: > /mail-filter/spamassassin-ruledujour/spamassassin-ruledujour-20050106.ebuild > 47: if [ -f "${ROOT}/etc/cron.daily/myrulesdujour" ]; then > </snip> Jakub, if you can't handle simple tasks like reading an ebuild and seeing that something is in fact in src_install, please just stay away from this bug. You're not contributing anything helpful; quite the contrary in fact.
mail-filter/dspam has been fixed.
media-sound/hydrogen was fixed by flameeyes on feb 17.
all fixed, except anubis and wis-go7007 for which individual reports have been filed (bug #258110 and #258111) thanks.