/etc/profile.d/speechd-user-port.sh references $USER

Bug #601114 reported by Brian Bloniarz
30
This bug affects 5 people
Affects Status Importance Assigned to Milestone
speech-dispatcher (Ubuntu)
Fix Released
Undecided
Unassigned
Nominated for Lucid by Joel Ebel

Bug Description

Binary package hint: speech-dispatcher

The profile script /etc/profile.d/speechd-user-port.sh references $USER, which I believe is a BSD-ism; the standard UNIX variable for the current username is $LOGNAME.

In particular, this causes the following error if /etc/profile is invoked from cron:
expr: syntax error

This is because cron defines $LOGNAME but not $USER. This behavior is described in crontab(5).

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: speech-dispatcher 0.6.8~unofficial~rc2-0ubuntu3
ProcVersionSignature: Ubuntu 2.6.32-21.32-server 2.6.32.11+drm33.2
Uname: Linux 2.6.32-21-server x86_64
Architecture: amd64
Date: Fri Jul 2 15:50:47 2010
InstallationMedia: Ubuntu-Server 10.04 LTS "Lucid Lynx" - Release amd64 (20100427)
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: speech-dispatcher

Revision history for this message
Brian Bloniarz (brianbloniarz) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package speech-dispatcher - 0.7-5ubuntu1

---------------
speech-dispatcher (0.7-5ubuntu1) maverick; urgency=low

  * Merge from debian unstable. Remaining changes:
    - Python-speechd should depend on speech-dispatcher
    - Moved the flite output module to a separate package, and added
      it to suggests
    - Use cdbs for package build, cleaner to maintain
    - Quieten logfiles by default
    - Only enable espeak output module
    - Fix pulse driver endainness
    - Fix broken spd-conf
  * debian/speech-dispatcher.init: Don't assume that the user was previously
    running speech-dispatcher system-wide, at least in Ubuntu
  * Remove references to speechd-server-spawn and speechd-user-port.sh, since
    speech-dispatcher now has a different way of spawning, and uses sockets
    (LP: #601114)
  * Flite patch from Debian fixes FTBFs (LP: #601005)
  * debian/patches/spd-conf-test-path-fix.patch: Fix path to test.wav file
    which gets played by spd-conf (LP: #314185)

speech-dispatcher (0.7-5) unstable; urgency=low

  * Move Python build dependencies from Build-Depends-Indep to Build-Depends;
    closes: #588107.
  * Standards 3.9.0 (no real change).

speech-dispatcher (0.7-4) unstable; urgency=low

  * Default AudioOutputMethod changed to "pulse" to prevent blocking audio
    output; information to README.Debian added.

speech-dispatcher (0.7-3) unstable; urgency=low

  * Paths in python-speechd adjusted to match Debian installation.
  * Package priorities set to match override entries.

speech-dispatcher (0.7-2) unstable; urgency=low

  * Link speech-dispatcher log location to /var/log/speech-dispatcher/, if
    it doesn't exist yet.
  * Permit access to speech-dispatcher socket to `audio' group.

speech-dispatcher (0.7-1) unstable; urgency=low

  * New upstream version.
  * Switch to dpkg-source 3.0 (quilt) format.
  * Versioned build dependency on flite-dev.
  * Don't start Speech Dispatcher by default; closes: #577217.
  * Standards 3.8.4 (no real change).
 -- Luke Yelavich <email address hidden> Thu, 15 Jul 2010 14:30:18 +1000

Changed in speech-dispatcher (Ubuntu):
status: New → Fix Released
Joel Ebel (jbebel)
tags: added: glucid
Revision history for this message
Joel Ebel (jbebel) wrote :

Would a backport into Lucid be possible for this? cron jobs which source /etc/profile.d wind up always returning this message, making cron jobs which should only output on error give output every time. Perhaps it could be patched more minimally than was done for Maverick, but some fix for Lucid would be much appreciated.

Revision history for this message
Chuck Karish (chuck-karish) wrote :

Setting LOGNAME in every login shell is required by POSIX. There's no such requirement for USER. The best practice is to bootstrap USER from LOGNAME wherever it's used. The environ(7) man page should be updated to reflect this.

Revision history for this message
Etienne Goyer (etienne-goyer-outlands) wrote :

At the very least, the offending /etc/profile.d/speechd-user-port.sh file should be removed on upgrade to maverick, as the file is not needed anymore. I filed bug #683845 about this.

Revision history for this message
Metabaronen (emil-assarsson) wrote :

There are other problems with the profile shell fragment:

- it assumes that the id never will be higher than the max port
- it guesses that the generated port number is free
- getent gets confused by numeric usernames

Also reported in Bug #696758.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.