Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 246299 - media-sound/sox-14.2.0 tries to get "distro name" from /etc/issue
Summary: media-sound/sox-14.2.0 tries to get "distro name" from /etc/issue
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Sound Team
URL: http://starship.python.net/crew/mardu...
Whiteboard:
Keywords:
: 248290 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-11-10 15:45 UTC by Albert W. Hopkins
Modified: 2008-11-26 17:09 UTC (History)
7 users (show)

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


Attachments
sox-14.2.0-gentoo.patch (sox-14.2.0-gentoo.patch,699 bytes, patch)
2008-11-10 17:12 UTC, Jeroen Roovers (RETIRED)
Details | Diff
sox-14.2.0.ebuild.diff (sox-14.2.0.ebuild.diff,942 bytes, patch)
2008-11-10 17:26 UTC, Jeroen Roovers (RETIRED)
Details | Diff
sox-14.2.0-distro.patch (sox-14.2.0-distro.patch,1.22 KB, patch)
2008-11-11 12:31 UTC, Peter Volkov (RETIRED)
Details | Diff
sox-14.2.0.ebuild.patch (sox-14.2.0.ebuild.patch,977 bytes, patch)
2008-11-11 12:35 UTC, Peter Volkov (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Albert W. Hopkins 2008-11-10 15:45:38 UTC
sox's configure script attempts to define an variable "DISTRO" with a value it reads from /etc/issue.  I don't know who thought this was a good idea, especially when /etc/issue like in the URL.  Consequently the build fails:

DPKGLIBDIR="\"/usr/lib/sox\"" -DDISTRO="\".vir. d .d$$$b. .cd$b. .d$b. d$$$$$ .d$b. .d$b. $$( )$ d$$ d$$$ Q$$$sox-14.2.0$sox-14.2.0.$$$. .$$$. Q$$$$$B$$$$P" d$sox-14.2.0Q$$b. $$. .$sox-14.2.0' `$.$sox-14.2.0' `$"$$$sox-14.2.0 Q$$$ d$sox-14.2.0 Q$$b $$b $$b..d$$$b..d$d$$$P" "$$$$ Q$Q$$ $$`Q$$$sox-14.2.0 `Q$$$sox-14.2.0 $$$sox-14.2.0 `""""" "" "" Q$sox-14.2.0 "Q$sox-14.2.0" "Q$sox-14.2.0" `Q$P" """\"" -O2 -march=k8 -mfpmath=sse -msse3 -ggdb -pipe   -Wtraditional-conversion  -O2 -march=k8 -mfpmath=sse -msse3 -ggdb -pipe -fsigned-char -D_FORTIFY_SOURCE=2 -Wall -W -Wmissing-prototypes -Wstrict-prototypes -pedantic -MT sox.o -MD -MP -MF .deps/sox.Tpo -c -o sox.o sox.c
/bin/sh: -c: line 0: unexpected EOF while looking for matching ``'
/bin/sh: -c: line 1: syntax error: unexpected end of file
make[1]: *** [sox.o] Error 2


A work-around is to temporarily move /etc/issue out of the way and then build the package.
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2008-11-10 17:12:36 UTC
Created attachment 171322 [details, diff]
sox-14.2.0-gentoo.patch

The obvious -gentoo.patch, but this should really be generalised and fixed upstream.
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2008-11-10 17:26:14 UTC
Created attachment 171324 [details, diff]
sox-14.2.0.ebuild.diff
Comment 3 Peter Volkov (RETIRED) gentoo-dev 2008-11-11 12:31:54 UTC
Created attachment 171411 [details, diff]
sox-14.2.0-distro.patch

Well I don't upstream ever accept such modification. So here is my suggestion:
it will allow to bypass automatic check by providing --with-distro= configure switch.
Comment 4 Peter Volkov (RETIRED) gentoo-dev 2008-11-11 12:35:03 UTC
Created attachment 171413 [details, diff]
sox-14.2.0.ebuild.patch

Patch for ebuild.
Comment 5 Peter Volkov (RETIRED) gentoo-dev 2008-11-11 12:39:42 UTC
Filled upstream bug report:
https://sourceforge.net/tracker/index.php?func=detail&aid=2262177&group_id=10706&atid=310706
Comment 6 jieryn 2008-11-11 12:49:21 UTC
sox-14.2.0.ebuild.patch and sox-14.2.0-distro.patch work for me. Thanks Peter,

Portage 2.2_rc13 (default/linux/amd64/2008.0/developer, gcc-4.3.2, glibc-2.8_p20080602-r0, 2.6.27.5 x86_64)
=================================================================
System uname: Linux-2.6.27.5-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T7700_@_2.40GHz-with-glibc2.2.5
Timestamp of tree: Tue, 11 Nov 2008 08:00:01 +0000
distcc 3.0 x86_64-pc-linux-gnu [disabled]
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7, 2.1.6-r1
dev-lang/python:     2.4.4-r15, 2.5.2-r8
dev-util/cmake:      2.6.2
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.3.0-r1
sys-apps/sandbox:    1.2.18.1-r3
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.4_p6, 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.19
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=core2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /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/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -march=core2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--verbose --keep-going --jobs 25 --load-average 25"
FEATURES="buildsyspkg cvs digest distlocks fixpackages metadata-transfer multilib-strict parallel-fetch preserve-libs protect-owned sandbox sfperms sign splitdebug strict unmerge-orphans userfetch usersandbox"
GENTOO_MIRRORS="http://gentoo.osuosl.org/"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="en"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
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/java-overlay /usr/local/portage/layman/nouveau /usr/local/portage/layman/mozilla /usr/local/portage /usr/local/portage/krossai /usr/local/portage/ibm-internal/gentoo-ebuilds /usr/local/portage/java-experimental"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X aac acl acpi alsa amd64 ao apache2 avahi bash-completion berkdb bluetooth bzip2 cairo caps cddb cdr cli cracklib crypt css ctype cups curl cvs dbus dirac directfb dri dvd dvdr dvdread emboss encode enscript evo fam fbcon ffmpeg firefox flac fortran gdbm gif git gmp gnome gnome-keyring gnutls gpm gtk gtkhtml hal iconv id3tag ieee1394 imagemagick imap imlib ipv6 isdnlog jpeg laptop libnotify lzo mad mailwrapper mbox midi mikmod mmx mng mp3 mpeg mplayer mudflap multilib musepack mysql ncurses network networkmanager nptl nptlonly nsplugin ogg opengl openmp pam pcre pdf perl png pop ppds pppd pulseaudio python qt3 qt3support qt4 quicktime rdesktop readline reflection rtc samba schroedinger sdl session sndfile snmp spell spl sse sse2 ssl ssse3 startup-notification subversion svg sysfs tcpd theora tiff truetype unicode usb vcd vhosts vorbis wmf x264 xinetd xml xorg xulrunner xv xvid zeroconf zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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" APACHE2_MPMS="peruser" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse void" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" USERLAND="GNU" VIDEO_CARDS="fbdev nouveau nv nvidia vesa vga"
Unset:  CPPFLAGS, CTARGET, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 7 Duncan 2008-11-16 07:47:56 UTC
Unusual bug.  A bunch of nonsense in purple text in the middle of the build! With the "vir", I was even wondering if someone had finally done a working virus for Linux and I caught it!  What a relief to find it was only someone using a rather questionable method of getting the distro!
Comment 8 Duncan 2008-11-20 14:04:44 UTC
Thanks to Ed Catmur's portage-patches scripts I didn't have to modify the ebuild at all.   Just plop the patch in the appropriate patches dir, in this case, plop a file with the appropriate EXTRA_ECONF setting in the appropriate env dir, and the ebuild worked fine, straight from the tree. =:^)

Too bad his user patching feature, or something similar to it, was never added to portage as it SURE makes things a lot easier when all it takes is a patch from the bug placed in the appropriate dir.  Unfortunately the URL I had for the scripts seems to be dead, but maybe it's available in the forums.
Comment 9 Peter Volkov (RETIRED) gentoo-dev 2008-11-22 18:09:57 UTC
@sound: either give me your Ok and I'll apply this patch or do it yourself, please. Upstream already applied similar patch in their CVS.
Comment 10 Peter Volkov (RETIRED) gentoo-dev 2008-11-22 21:11:50 UTC
Thanks all for report, suggestions, patience. Patch added to the tree. Fixed.
Comment 11 Jeroen Roovers (RETIRED) gentoo-dev 2008-11-26 17:09:14 UTC
*** Bug 248290 has been marked as a duplicate of this bug. ***