Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 230948 - app-text/docbook-sgml-utils-0.6.14: commands show problems with spaces in filename arguments as well as in the working dir's path
Summary: app-text/docbook-sgml-utils-0.6.14: commands show problems with spaces in fil...
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: Normal minor (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-06 14:52 UTC by Raphael Das Gupta
Modified: 2013-10-13 11:15 UTC (History)
0 users

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 Raphael Das Gupta 2008-07-06 14:52:01 UTC
If a command of app-text/docbook-sgml-utils-0.6.14 (jw, docbook2pdf etc.) is called and either the path of the current working dir (.) or a filename in one of the arguments contains spaces, the command seems to get confused and to interpret it as several arguments/files.

Reproducible: Always

Steps to Reproduce:
1. install app-text/docbook-sgml-utils-0.6.14

2. run the following commands in a terminal:
	mkdir foo\ bar
	cd foo\ bar/
	echo "foobar" > notavaliddocbookfile.sgml
	docbook2pdf notavaliddocbookfile.sgml
Actual Results:  
Output on terminal:

/usr/bin/jw: line 273: [: /home/das-g/foo: binary operator expected
Using catalogs: /etc/sgml/sgml-docbook-3.0.cat
Using stylesheet: /usr/share/sgml/docbook/utils-0.6.14/docbook-utils.dsl#print
Working on: /home/das-g/foo bar/notavaliddocbookfile.sgml
jade:E: cannot open "/home/das-g/foo" (No such file or directory)
jade:E: cannot find "bar/notavaliddocbookfile.sgml"; tried "bar/notavaliddocbookfile.sgml", "/usr/share/sgml/bar/notavaliddocbookfile.sgml"
/usr/bin/jw: line 436: cd: /home/das-g/foo: No such file or directory

Expected Results:  
Something like:

Using catalogs: /etc/sgml/sgml-docbook-3.0.cat
Using stylesheet: /usr/share/sgml/docbook/utils-0.6.14/docbook-utils.dsl#print
Working on: /home/das-g/foo bar/notavaliddocbookfile.sgml
jade:/home/das-g/foo bar/notavaliddocbookfile.sgml:1:0:E: character "f" not allowed in prolog
jade:/home/das-g/foo bar/notavaliddocbookfile.sgml:1:7:E: end of document in prolog

Note that I intentionally used file content that isn't valid SGML to get shorter output. This bug is also reproducible with valid DocBook SGML files.

Workaround: Rename everything to not contain any spaces.

Expected reason for bug/ Expected fix: I guess this is caused by missing re-escaping of the arguments by the wrapper script, so adding that re-escaping should fix it.

I don't know if this (The Gentoo Bugzilla) is the correct place to file this bug, as I guess it's present upstream as well. Though, as I didn't try with the RPM version at http://sources.redhat.com/docbook-tools/, but the one installed by portage, I though I'd file it here, first.

emerge --info
Portage 2.1.4.4 (default-linux/x86/2007.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.24-gentoo-r8-ati-fb i686)
=================================================================
System uname: 2.6.24-gentoo-r8-ati-fb i686 Intel(R) Pentium(R) M processor 1.80GHz
Timestamp of tree: Thu, 03 Jul 2008 15:45:01 +0000
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.4.4-r13
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r2
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium-m -O2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=pentium-m -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://ftp.club-internet.fr/pub/mirrors/gentoo ftp://130.59.10.34/mirror/gentoo/ http://pandemonium.tiscali.de/pub/gentoo/ http://gd.tuwien.ac.at/opsys/linux/gentoo/ ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo ftp://ftp.public.fix.fi/gentoo http://gentoo.prz.rzeszow.pl ftp://212.219.56.133/sites/www.ibiblio.org/gentoo/ ftp://212.219.56.135/sites/www.ibiblio.org/gentoo/ http://ftp.roedu.net/pub/mirrors/gentoo.org/"
LANG="en_US.UTF-8"
LINGUAS="de en fr bn"
MAKEOPTS="-j2"
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/portage/local/layman/secondlife /home/portdir-overlay"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X a52 aac aalib acl acpi alsa apm bash-completion berkdb bluetooth cairo cdr cli cracklib crypt cups dbus dri dvd dvdr dvdread eds emboss encode esd evo exif fam fbsplash ffmpeg firefox fortran gdbm gif gnome gphoto2 gpm gstreamer gtk gtkhtml hal iconv imlib ipv6 isdnlog java jpeg jpeg2k kerberos ldap libcaca mad midi mikmod mmx mp3 mpeg mudflap ncurses nls nptl nptlonly nsplugin offensive ogg openal opengl openmp pam pcmcia pcre pdf perl png pppd python qt3 qt3support quicktime readline reflection samba sdl session spell spl sse sse2 ssl svg tcpd tetex threads tiff truetype unicode usb vorbis win32codecs x86 xml xorg xosd xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 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 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 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" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de en fr bn" USERLAND="GNU" VIDEO_CARDS="fglrx radeon"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Ian Delaney (RETIRED) gentoo-dev 2012-03-23 16:12:57 UTC
I wonder; is this a case of taunting a style of syntax that in fundamentally contrary to linux?.  Making spaces in directories and file names....
Well perhaps the perl packages ought cope.  In just under 4 years, no-one's feathers ruffled enough to pick up on it && make a fix.
Hmm.
Comment 2 Raphael Das Gupta 2012-03-23 18:18:46 UTC
My guess is that docbook-sgml isn't popular enough for this issue itching anyone. I would imagine that spaces in directory names or file names aren't that uncommon where they are user-chosen (i.e. in /home/.../), even with Linux users.
Comment 3 Pacho Ramos gentoo-dev 2013-10-13 11:15:46 UTC
Try with -r1:
*docbook-sgml-utils-0.6.14-r1 (03 Oct 2010)

  03 Oct 2010; Michael Weber <xmw@gentoo.org>
  +docbook-sgml-utils-0.6.14-r1.ebuild,
  +files/docbook-sgml-utils-0.6.14-grep-2.7.patch:
  Revision bump to respect new sys-apps/grep-2.7 syntax check ([:space:] and
  [:digits:] no longer accepted as classes, bug #338853).
  Thanks tampakrap and ABCD for the review.