Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 355177 - x11-wm/fluxbox-1.1.1-r3: fbsetbg shell script is not fully posix compliant
Summary: x11-wm/fluxbox-1.1.1-r3: fbsetbg shell script is not fully posix compliant
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Jim Ramsay (lack) (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-16 12:29 UTC by Jimmy Kloss
Modified: 2011-02-28 00:20 UTC (History)
2 users (show)

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


Attachments
more posix compliances (fbsetbg_posix.patch,723 bytes, patch)
2011-02-16 12:33 UTC, Jimmy Kloss
Details | Diff
Posix-compliant fluxbox-1.1.1-osx-has-otool.patch (fluxbox-1.1.1-osx-has-otool.patch,645 bytes, patch)
2011-02-23 14:58 UTC, Jim Ramsay (lack) (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jimmy Kloss 2011-02-16 12:29:50 UTC
Probably while adding otool to detect if Esetroot is build against libImlib, a bash-ism made it into fbsetbg. This makes it e.g. fail to detect Esetroot, when /bin/sh is linked to /bin/dash.

I'll attach a little patch for review.

Reproducible: Always

Steps to Reproduce:
1. ln -sf /bin/dash /bin/sh
2. start fluxbox
3. set a wallpaper with fbsetbg
4. notice that all the fancy is gone as 'display' is used instead of Esetroot


Actual Results:  
User gets sad :'-(

Expected Results:  
User gets happy :-)
Comment 1 Jimmy Kloss 2011-02-16 12:33:00 UTC
Created attachment 262729 [details, diff]
more posix compliances

This works fine for me atleast.
Comment 2 Jim Ramsay (lack) (RETIRED) gentoo-dev 2011-02-23 14:58:46 UTC
Created attachment 263637 [details, diff]
Posix-compliant fluxbox-1.1.1-osx-has-otool.patch

Thanks for the report.  This posix issue is due to a patch added by the prefix team for OSX support.  This attachment *should* be the equivalent patch, though I have no way of testing it here with no OSX box of my own.

I'll notify the prefix folks to take a look at this bug to verify this works.
Comment 3 Jim Ramsay (lack) (RETIRED) gentoo-dev 2011-02-23 15:05:32 UTC
@Prefix team: See comment above where I added an attachment... Please verify that this replacement for the existing 'fluxbox-1.1.1.1-osx-has-otool.patch' actually does what it's supposed to do on OSX.
Comment 4 Fabian Groffen gentoo-dev 2011-02-23 16:21:45 UTC
Looking at the (original) patch, I have the impression it's too careful.


elif ldd `which Esetroot`|grep libImlib 2>&1 > /dev/null || \
    otool -L `which Esetroot`|grep libImlib 2>&1 > /dev/null ; then

should do too, IFAICT.  Either of ldd or otool should exist and think that whatever which Esetroot returns is valid, and then grep has to like it.

Or am I overlooking something obvious here?
Comment 5 Jim Ramsay (lack) (RETIRED) gentoo-dev 2011-02-23 17:56:24 UTC
(In reply to comment #4)
> IFAICT.  Either of ldd or otool should exist and think that
> whatever which Esetroot returns is valid, and then grep has to like it.
> 
> Or am I overlooking something obvious here?

As far as I understand the intent of the script, what you say seems reasonable.

However, I don't have any way to test it.
Comment 6 Fabian Groffen gentoo-dev 2011-02-23 18:00:02 UTC
if it works for you, commit it
Comment 7 Jim Ramsay (lack) (RETIRED) gentoo-dev 2011-02-28 00:20:55 UTC
Yes, works for me.  Committed.

I didn't revbump for it, but it's in all fluxbox-1.1.1-r* and fluxbox-1.3.*