Discussion:
[Libreoffice-bugs] [Bug 62192] New: : broken launch script, bork in March in Germany
b***@freedesktop.org
2013-03-11 21:50:24 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=62192

Priority: medium
Bug ID: 62192
Assignee: libreoffice-***@lists.freedesktop.org
Summary: : broken launch script, bork in March in Germany
Severity: normal
Classification: Unclassified
OS: Linux (All)
Reporter: ***@gmail.com
Hardware: Other
Whiteboard: BSA
Status: UNCONFIRMED
Version: 4.0.1.2 release
Component: Localization
Product: LibreOffice

Problem description:

I ran into this problem last year, in the same month, and here I am again. This
section of code is in /usr/lib/libreoffice/program/soffice:

---------------------------
# resolve installation directory
sd_cwd="`pwd`"
if [ -h "$0" ] ; then
sd_basename=`basename "$0"`
sd_script=`ls -l "$0" | sed "s/.*${sd_basename} -> //g"`
cd "`dirname "$0"`"
cd "`dirname "$sd_script"`"
else
cd "`dirname "$0"`"
fi
sd_prog=`pwd`
cd "$sd_cwd"
-------------------------
The gentoo developers rightly refer to this code as "completely broken", as it
causes LibreOffice to puke on launch when trying to determine the month string
of its working directory if used on a system for which certain months use
non-standard characters.

For instance, in Gremany, the current month is "März." Launching LO any time
between now and 2013-04-01 will cause LO to fail with the following error:

-----------------------------
$ libreoffice
ls: error initializing month strings
/usr/bin/libreoffice: line 58: cd: lrwxrwxrwx 1 root root 38 10.
Mä/usr/lib64/libreoffice/program: No such file or directory
/usr/bin/libreoffice: line 180: /usr/bin/oosplash: No such file or directory
--------------------------------

Steps to reproduce:
1. set the filesystem locale to German (any variant)
2. try to launch LO in the month of March
3. cry

Current behavior: the launcher pukes

Expected behavior: the launcher could maybe use a coreutil that is pretty good
at reading month strings? In any case, it should launch properly.

Cheers,


Operating System: Linux (Other)
Version: 4.0.1.2 release
--
You are receiving this mail because:
You are the assignee for the bug.
b***@freedesktop.org
2013-03-14 15:08:29 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=62192

ExecutorElassus <***@gmail.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Component|Localization |Libreoffice
--
You are receiving this mail because:
You are the assignee for the bug.
b***@freedesktop.org
2013-04-16 05:28:10 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=62192

Andras Timar <***@gmail.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Whiteboard|BSA |EasyHack DifficultyEasy
| |SkillScript
Ever confirmed|0 |1

--- Comment #1 from Andras Timar <***@gmail.com> ---
This is an easy hack. The only trick is that the solution need to work on a
wide variety of systems, not on Linux only.
See also:
http://stackoverflow.com/questions/7665/how-to-resolve-symbolic-links-in-a-shell-script
--
You are receiving this mail because:
You are the assignee for the bug.
b***@freedesktop.org
2013-06-14 09:14:07 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=62192

--- Comment #2 from Erik Auerswald <***@unix-ag.uni-kl.de> ---
Created attachment 80803
--> https://bugs.freedesktop.org/attachment.cgi?id=80803&action=edit
Set LC_ALL=C

The script should be locale independent. Set LC_ALL=C to do this.
--
You are receiving this mail because:
You are the assignee for the bug.
b***@freedesktop.org
2013-06-14 20:21:09 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=62192

--- Comment #3 from Erik Auerswald <***@unix-ag.uni-kl.de> ---
Unconditionally overwriting locale settings might have unintended consequences
for the started LibreOffice program. Thus I have written two alternative
patches:

1. libreoffice_bug62192_minimal_fix.patch
This fixes the offending 'ls' call only.

2. libreoffice_bug62192_involved_fix.patch
This saves the current LC_ALL setting, sets the POSIX locale for (most of) the
script, and restores the original setting before exec'ing the LibreOffice
binary.

The minimal fix seems quite safe, but the more invovled one should be tested on
several different systems.

BTW, this bug is not reproducible with Debian GNU/Linux (checked, old stable,
stable and unstable), because the GNU sed used copes with non-ASCII input.
--
You are receiving this mail because:
You are the assignee for the bug.
b***@freedesktop.org
2013-06-14 20:22:10 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=62192

--- Comment #4 from Erik Auerswald <***@unix-ag.uni-kl.de> ---
Created attachment 80825
--> https://bugs.freedesktop.org/attachment.cgi?id=80825&action=edit
[PATCH] Minimal fix: use POSIX locale for ls call only
--
You are receiving this mail because:
You are the assignee for the bug.
b***@freedesktop.org
2013-06-14 20:23:13 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=62192

--- Comment #5 from Erik Auerswald <***@unix-ag.uni-kl.de> ---
Created attachment 80826
--> https://bugs.freedesktop.org/attachment.cgi?id=80826&action=edit
[PATCH] Save LC_ALL, use POSIX locale for script, and restore LC_ALL before
starting LibreOffice
--
You are receiving this mail because:
You are the assignee for the bug.
b***@freedesktop.org
2013-06-14 20:23:48 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=62192

Erik Auerswald <***@unix-ag.uni-kl.de> changed:

What |Removed |Added
----------------------------------------------------------------------------
Attachment #80803|0 |1
is obsolete| |
--
You are receiving this mail because:
You are the assignee for the bug.
b***@freedesktop.org
2013-07-09 21:43:39 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=62192

Björn Michaelsen <***@canonical.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO

--- Comment #6 from Björn Michaelsen <***@canonical.com> ---
Patch looks good, pushed as:


https://gerrit.libreoffice.org/gitweb?p=core.git;a=commit;h=e75b8e9b4bf720f3bcf479c6915d7815bf8f3e6e

to master.

@Erik: Could you send a blanket statement as per:


https://wiki.documentfoundation.org/Development/Developers#Developers_and_Contributors_list

to ***@lists.freedesktop.org?
--
You are receiving this mail because:
You are the assignee for the bug.
b***@freedesktop.org
2013-07-09 21:44:46 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=62192

Commit Notification <libreoffice-***@lists.freedesktop.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
Whiteboard|EasyHack DifficultyEasy |EasyHack DifficultyEasy
|SkillScript |SkillScript target:4.2.0

--- Comment #7 from Commit Notification <libreoffice-***@lists.freedesktop.org> ---
Erik Auerswald committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=e75b8e9b4bf720f3bcf479c6915d7815bf8f3e6e

fdo#62192: broken launch script, bork in March in Germany



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
--
You are receiving this mail because:
You are the assignee for the bug.
b***@freedesktop.org
2013-07-29 08:27:45 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=62192

Björn Michaelsen <***@canonical.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
See Also| |https://launchpad.net/bugs/
| |1141106
--
You are receiving this mail because:
You are the assignee for the bug.
b***@freedesktop.org
2013-10-18 19:58:36 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=62192

Björn Michaelsen <***@canonical.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |RESOLVED
Resolution|--- |FIXED

--- Comment #8 from Björn Michaelsen <***@canonical.com> ---
assumed fixed with the commit.
--
You are receiving this mail because:
You are the assignee for the bug.
Loading...