Hardy should include Bash 3.1.x version due to regex syntax change

Bug #110407 reported by Robert
8
Affects Status Importance Assigned to Milestone
bash (Ubuntu)
Fix Released
High
Bash
Declined for Feisty by Steve Langasek
Declined for Gutsy by Steve Langasek
Declined for Hardy by Steve Langasek

Bug Description

The syntax of regexes in Bash 3.2 was changed so that single quotes no longer surround regexes. e.g, a regex of the form

  if [[ "foo.tex" =~ '^(.*)\.tex$' ]]

becomes

  if [[ "foo.tex" =~ ^(.*)\.tex$ ]]

The version of Bash in Ubuntu Feisty was a 3.2.x version. The problem is that this can break many scripts on existing systems.

It is not merely enough to warn users about this, as with Bug #109931. This can be a major blocker for system administrators in upgrading, if they run servers with many shell scripts. (Many sysadmins would prefer not to touch working code on critical systems, lest they break something; or they would rather take the time to make sure updated scripts work properly.)

There should be an option to use an older version of Bash 3.1.x from Edgy, so that users can downgrade Bash while using other features of Feisty.

A question remains as to what scripts (if any) in Feisty were already changed to account for the change in regex syntax, and whether they will work in the older bash.

Related branches

Revision history for this message
Johnathon (kirrus) wrote :

Another problem caused by this bug is bug #78017. Confirming.

Changed in bash:
status: Unconfirmed → Confirmed
Revision history for this message
Allen Smith (lazlor) wrote :

This just bit us where I work as people have started to upgrade to feisty. We have many scripts that use regexps that are now broken and since we have a mixed environment of FCx, kubuntu, and solaris users that all have to run these scripts we have much pain. I've just sent an email out to all of our developers about this, warning them off feisty.

Revision history for this message
Johnathon (kirrus) wrote :

This is going to bite those who are jumping from LTS to LTS release. I would recommend a medium priority.

Revision history for this message
Robert (robrwo) wrote :

This needs to be acted on for Hardy.

Changed in bash:
assignee: nobody → bash-shell
Changed in bash:
importance: Undecided → Medium
status: Confirmed → Triaged
importance: Medium → Undecided
status: Triaged → Confirmed
Revision history for this message
Andrea Corbellini (andrea.corbellini) wrote :

Set importance to High because this can have a severe impact to a portion of users, athough small, and because this can make an Ubuntu installation unusuable.

Changed in bash:
importance: Undecided → High
status: Confirmed → Triaged
Revision history for this message
Álvaro del Olmo Alonso (dllum) wrote : Re: [Bug 110407] Re: Feisty should include Bash 3.1.x version due to regex syntax change

I agree. Not a good idea. I do know about lot of scripts using single
quotes.

2008/2/23, Andrea Corbellini <email address hidden>:
>
> Set importance to High because this can have a severe impact to a
> portion of users, athough small, and because this can make an Ubuntu
> installation unusuable.
>
> ** Changed in: bash (Ubuntu)
> Importance: Undecided => High
> Status: Confirmed => Triaged
>
>
> --
> Feisty should include Bash 3.1.x version due to regex syntax change
> https://bugs.launchpad.net/bugs/110407
> You received this bug notification because you are a member of Bash,
> which is a bug assignee.
>

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

This bug was fixed in the package bash - 3.2-0ubuntu16

---------------
bash (3.2-0ubuntu16) hardy; urgency=low

  * Remove /etc/skel/.bash_profile, if it is unmodified; if modified and
    /etc/skel/.profile is unmodifed, move .bash_profile to .profile.
    LP: #211406.
  * /etc/skel/.bashrc: Add an option to blurt a terminal window with a
    colored prompt. LP: #103929.
  * /etc/skel/.bashrc: Add color support for grep and friends (commented out
    by default). LP: #144632.
  * /etc/skel/.profile: Avoid the use of `~'. LP: #200283.
  * Add a shopt option compat31 to falls back to the behaviour of bash-3.1
    and earlier versions, in that quoting the string argument to the [[
    command's =~ +operator does not force string matching. LP: #110407.

 -- Matthias Klose <email address hidden> Tue, 15 Apr 2008 01:24:06 +0200

Changed in bash:
status: Triaged → Fix Released
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.