Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 35851 - tcng ebuild does not work: /var/tmp/portage/tcng-9h/work/ coded into paths
Summary: tcng ebuild does not work: /var/tmp/portage/tcng-9h/work/ coded into paths
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Robin Johnson
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-14 20:11 UTC by Mark Wagner
Modified: 2003-12-17 03:58 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Wagner 2003-12-14 20:11:11 UTC
The ebuild for tcng 9h causes /var/tmp/portage/tcng-9h/work/ to be set as the location of the its files. For example /usr/bin/tcc is:

#!/bin/sh
TCNG_TOPDIR=/var/tmp/portage/tcng-9h/work/usr exec /var/tmp/portage/tcng-9h/work/usr/bin/tcc.bin "$@"

I can edit this file but it still can't find tcc.bin, which seems to have /var/tmp/portage/tcng-9h/work emebedded in it too:

mark@gir mark $ strings /usr/bin/tcc.bin | grep portage
/var/tmp/portage/tcng-9h/work/tcng
/var/tmp/portage/tcng-9h/work/tcng
/var/tmp/portage/tcng-9h/work/tcng
mark@gir mark $ 


Reproducible: Always
Steps to Reproduce:
Following <http://linux-ip.net/gl/tcng/node8.html>:

Step 1:
    Write a file with the tcng configuration. We shall call the file example.tc:

dev eth0 {
    egress {
        drop if tcp_sport != PORT_HTTP;
    }
}

Step 2:
    Run tcc to convert the tcng configuration to tc commands. We save the output in a file called example.sh:

tcc -r example.tc >example.sh

    The -r switch tells tcc to emit a command to remove any traffic control setup that may be in use at eth0 before trying to add the new configuration.

    You can look at the resulting output with cat example.sh, but it will look rather cryptic.


Actual Results:  
mark@gir mark $ tcc -r example.tc > example.sh
/usr/bin/tcc: line 2: /var/tmp/portage/tcng-9h/work/usr/bin/tcc.bin: No such
file or directory
/usr/bin/tcc: line 2: exec: /var/tmp/portage/tcng-9h/work/usr/bin/tcc.bin:
cannot execute: No such file or directory
mark@gir mark $ 

or, with the paths fixed in /usr/bin/tcc:

mark@gir mark $ tcc -r example.tc > example.sh
Could not run/locate "tcc.bin"
mark@gir mark $ 

example.sh is empty.

Expected Results:  
An example.sh with cryptic commands.

Portage 2.0.49-r18 (default-x86-1.4, gcc-3.3.2, glibc-2.3.2-r9, 2.6.0-test10-mm1)
=================================================================
System uname: 2.6.0-test10-mm1 i686 Pentium II (Klamath)
Gentoo Base System version 1.4.3.12
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-march=pentium2 -O3 -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3/share/config /usr/share/config /usr/share/texmf/dvipdfm/config/
/usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/
/usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-march=pentium2 -O3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox userpriv usersandbox"
GENTOO_MIRRORS="http://www.lanfear.net/ http://gentoo.ccccom.com
http://csociety-ftp.ecn.purdue.edu/pub/gentoo/ http://gentoo.noved.org/
http://gentoo.mirrors.pair.com/ http://cudlug.cudenver.edu/gentoo/"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="X Xaw3d apache apm arts avi berkdb cdr cgi crypt cscope cups emacs encode
esd ethereal foomaticdb gd gdbm gif gnome gpm gstreamer gtk gtk2 gtkhtml guile
imlib innodb java jikes jpeg kde libg++ libwww mad mbox mikmod mmx motif mozilla
mpeg mysql ncurses nls oggvorbis opengl oss pam pdflib perl plotutils png
postgres ppds python qt quicktime readline sasl sdl slang snmp spell sse ssl
svga tcpd tetex tiff truetype usb wmf x86 xml xml2 xmms xv zlib"
Comment 1 Seemant Kulleen (RETIRED) gentoo-dev 2003-12-15 15:03:52 UTC
it's robbat2's package
Comment 2 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-12-15 18:56:16 UTC
fixing it now.
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-12-15 23:08:59 UTC
It seems to be partially upstream bug, I'm opening a discussion with the author about it.

This part is upstream:
mark@gir mark $ tcc -r example.tc > example.sh
Could not run/locate "tcc.bin"

The command that tcc is actually running is:
cpp -$ tcc.bin example.tc -I... -include...

and it is cpp that produces 'Could not run/locate "tcc.bin"'
Comment 4 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-12-17 03:58:43 UTC
fixed in the new version 9i in CVS.
still discussion in progress with author, but i've put in my own fixes to make it work for now. they'll probably be accepted upstream.