Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 356547 - net-analyzer/snort-2.9.0.4 - dodoc $T/build.log fails because it is missing when PORT_LOGDIR is set
Summary: net-analyzer/snort-2.9.0.4 - dodoc $T/build.log fails because it is missing w...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Patrick Lauer
URL: http://www.snort.org/
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-26 07:54 UTC by Stefan Wimmer
Modified: 2011-03-01 08:17 UTC (History)
4 users (show)

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


Attachments
ebuild log file, gzipped (net-analyzer:snort-2.9.0.4:20110228-135126.log.gz,16.34 KB, application/x-gzip)
2011-02-28 17:20 UTC, David W Noon
Details
emerge --info (emerge_info.txt,4.77 KB, text/plain)
2011-02-28 18:29 UTC, David W Noon
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Wimmer 2011-02-26 07:54:22 UTC
net-analyzer/snort-2.9.0.4 fails to install because build.log is missing in /var/tmp/portage/net-analyzer/snort-2.9.0.4

Reproducible: Always

Steps to Reproduce:
1. emerge -va snort

Actual Results:  
 * Messages for package net-analyzer/snort-2.9.0.4:

 * QA Notice: file does not exist:
 * 
 *      dodoc: /var/tmp/portage/net-analyzer/snort-2.9.0.4/temp/build.log does not exist
 * ERROR: net-analyzer/snort-2.9.0.4 failed (install phase):
 *   Failed to install support files
 * 
 * Call stack:
 *     ebuild.sh, line  56:  Called src_install
 *   environment, line 2995:  Called die
 * The specific snippet of code:
 *       dodoc "${WORKDIR}/${PF}/config.log" "${T}/build.log" || die "Failed to install support files";

It also leaves modified /etc/{passwd,shadow,group} where the user/group snort is added ...


Expected Results:  
Finishing the emerge of the package.

Portage 2.1.9.41 (default/linux/amd64/10.0, gcc-4.4.5, glibc-2.13-r1, 2.6.37-gentoo-nouveau x86_64)
=================================================================
System uname: Linux-2.6.37-gentoo-nouveau-x86_64-Intel-R-_Core-TM-_i7_CPU_870_@_2.93GHz-with-gentoo-2.0.1
Timestamp of tree: Sat, 26 Feb 2011 03:15:01 +0000
app-shells/bash:     4.1_p9
dev-java/java-config: 2.1.11-r3
dev-lang/python:     2.7.1-r1, 3.1.3-r1
dev-util/cmake:      2.8.4
sys-apps/baselayout: 2.0.1-r1
sys-apps/openrc:     0.7.0
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
sys-devel/binutils:  2.21
sys-devel/gcc:       4.4.5, 4.5.2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.4-r1
sys-devel/make:      3.82
virtual/os-headers:  2.6.36.1 (sys-kernel/linux-headers)
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /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=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--color y --with-bdeps y --keep-going"
FEATURES="assume-digests binpkg-logs buildsyspkg distlocks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://ftp.snt.utwente.nl/pub/os/linux/gentoo http://gentoo.tiscali.nl/ http://mirror.muntinternet.net/pub/gentoo/ "
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j12 --load-average=24"
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="/var/lib/layman/lcd-filtering /var/lib/layman/mpd /usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X aac acl acpi alsa amd64 berkdb bzip2 cairo cli consolekit cracklib crypt cups cxx dbus device-mapper dirac dri encode exif flac fortran gdbm gif gphoto2 gpm iconv id3 jpeg libnotify maildir mmx modules mp3 mudflap multilib ncurses nls nptl nptlonly ogg opengl openmp pam pcre perl png policykit pppd python qt3support qt4 readline scanner semantic-desktop session sse sse2 ssl startup-notification svg sysfs tcpd tiff truetype udev unicode vdpau vim-syntax vorbis x264 xorg xulrunner xvid zlib zsh-completion" ALSA_CARDS="hda-intel emu10k1" 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 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="directory ptp2 usb" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmin txt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia nouveau" 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, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 David W Noon 2011-02-28 13:47:45 UTC
I can confirm this problem on x86 too.
Comment 2 Jason Wallace 2011-02-28 16:52:38 UTC
I have not been able to reproduce this on a stable system. Are you both running with ACCEPT_KEYWORDS="" uncommented in make.conf?
Comment 3 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2011-02-28 17:00:31 UTC
Please add the build.log as an attachment to this bug report.
Comment 4 David W Noon 2011-02-28 17:20:24 UTC
Created attachment 264189 [details]
ebuild log file, gzipped

My system is running all stable packages.  Ebuild log is attached.
Comment 5 Jason Wallace 2011-02-28 17:47:57 UTC
Your log shows it tried to find the file in 

"/var/lib/portage/tmp/portage/net-analyzer/snort-2.9.0.4/temp/build.log"

The ebuild expects the file to be in "${T}/build.log", which according to http://devmanual.gentoo.org/ebuild-writing/variables/index.html should be...

"${PORTAGE_BUILDDIR}/temp" = "/var/tmp/portage/net-analyzer/snort-2.9.0.4/temp" 

I'm not sure why ${T} would expand to "/var/lib/portage/tmp/portage/net-analyzer/snort-2.9.0.4/temp"

Comment 6 Stefan Wimmer 2011-02-28 17:59:37 UTC
In my case it looks in the correct directory but there is no build.log ...

 * Messages for package net-analyzer/snort-2.9.0.4:
 * QA Notice: file does not exist:
 * 
 *      dodoc: /var/tmp/portage/net-analyzer/snort-2.9.0.4/temp/build.log does not exist
 * ERROR: net-analyzer/snort-2.9.0.4 failed (install phase):
 *   Failed to install support files
 * 
 * Call stack:
 *     ebuild.sh, line  56:  Called src_install
 *   environment, line 2991:  Called die
 * The specific snippet of code:
 *       dodoc "${WORKDIR}/${PF}/config.log" "${T}/build.log" || die "Failed to install support files";
 * 

root@swimmer /etc/portage % find /var/tmp/portage/net-analyzer/snort-2.9.0.4 -name 'build*' 
/var/tmp/portage/net-analyzer/snort-2.9.0.4/work/snort-2.9.0.4/src/win32/WIN32-Prj/build_all.dsp
/var/tmp/portage/net-analyzer/snort-2.9.0.4/work/snort-2.9.0.4/src/win32/WIN32-Prj/build_releases.bat
/var/tmp/portage/net-analyzer/snort-2.9.0.4/work/snort-2.9.0.4/src/dynamic-preprocessors/build
/var/tmp/portage/net-analyzer/snort-2.9.0.4/work/snort-2.9.0.4/src/build.h
/var/tmp/portage/net-analyzer/snort-2.9.0.4/build-info
Comment 7 David W Noon 2011-02-28 18:06:28 UTC
(In reply to comment #5)
> I'm not sure why ${T} would expand to
> "/var/lib/portage/tmp/portage/net-analyzer/snort-2.9.0.4/temp"

My PORTAGE_TMPDIR is set to '/var/lib/portage/tmp'.  This gives Portage its own mount point so that its work file requirements are isolated from all other applications.  The logical volume is 8GiB in size.

No ebuild should assume /var/tmp for PORTAGE_TMPDIR.
Comment 8 David W Noon 2011-02-28 18:29:56 UTC
Created attachment 264195 [details]
emerge --info

I have attached my emerge --info details so that they are disambiguated from Stefan's posted earlier.
Comment 9 Jason Wallace 2011-02-28 19:46:13 UTC
The ebuild does not assume "/var/tmp for PORTAGE_TMPDIR". The ebuild specifically uses ${T}.

~ # grep \/build.log /usr/portage/net-analyzer/snort/snort-2.9.0.4.ebuild
                "${T}/build.log" || die "Failed to install support files"

${T} will change if you make changes to the default portage directories.

On my system I set PORTAGE_TMPDIR to the same thing you have and it still works fine for me.

~ # ls -l /var/lib/portage/tmp/portage/net-analyzer/snort-2.9.0.4/temp/build.*
-rw-rw---- 1 portage portage 222365 Feb 28 14:30 /var/lib/portage/tmp/portage/net-analyzer/snort-2.9.0.4/temp/build.log

I'm still not able to reproduce this issue.

Where did you find the build.log you submitted? Was it in  /var/lib/portage/tmp/portage/net-analyzer/snort-2.9.0.4/temp/

or some other directory?



(In reply to comment #7)
> (In reply to comment #5)
> > I'm not sure why ${T} would expand to
> > "/var/lib/portage/tmp/portage/net-analyzer/snort-2.9.0.4/temp"
> 
> My PORTAGE_TMPDIR is set to '/var/lib/portage/tmp'.  This gives Portage its own
> mount point so that its work file requirements are isolated from all other
> applications.  The logical volume is 8GiB in size.
> 
> No ebuild should assume /var/tmp for PORTAGE_TMPDIR.
> 

Comment 10 David W Noon 2011-02-28 20:21:42 UTC
(In reply to comment #9)
> The ebuild does not assume "/var/tmp for PORTAGE_TMPDIR". The ebuild
> specifically uses ${T}.

My statement was a generic one, not specific to this ebuild, and in reply to your comment #5.

> Where did you find the build.log you submitted? Was it in 
> /var/lib/portage/tmp/portage/net-analyzer/snort-2.9.0.4/temp/

It is not build.log, but the log of the ebuild processing.

The original error report states that the build.log file cannot be found, during the "dodoc" processing.  A manual check confirms its absence.
Comment 11 Jason Wallace 2011-02-28 20:44:40 UTC
Stefan & David,

What does "ls -l /usr/share/doc/snort-2.9.0.4/support/" show?


To the @gentoo.org folks,

Is there an option somewhere that would suppress the creation of build.log? 
Comment 12 Jeroen Roovers (RETIRED) gentoo-dev 2011-02-28 20:51:23 UTC
I don't see why these files (config.log and build.log) should be saved to ROOT at all. We only need them when src_{configure,compile}() fail, and in the default portage configuration those files would be preserved anyway. So removing that from the ebuild would certainly fix most cases.

Other than that, $T/build.log is used _only_ if PORT_LOGDIR is not set. So the ebuild should not assume the file to be in $T.
Comment 13 Jeroen Roovers (RETIRED) gentoo-dev 2011-02-28 20:55:37 UTC
Fixed without a revision bump by removing the offending insinto/dodoc. Thank you for reporting.
Comment 14 Stefan Wimmer 2011-03-01 08:17:24 UTC
(In reply to comment #13)
> Fixed without a revision bump by removing the offending insinto/dodoc. Thank
> you for reporting.

Thanks for fixing :)