busybox gzip, bzip2 crash XFE

2010-09-11
2013-04-11
  • Kim Michael Eriksen
    Kim Michael Eriksen
    2010-09-11

    I run XFE 1.32.1 on a system based on busybox ver. 1.17.2 (most recent) that handles gzip and bzip2 as internal commands. Whenever I in XFE select a file and choose "Add to archive" and select gzip or bzip2, the "Add to archive" pop-up window appears with no text and XFE freezes completely. However, the gz or bz2 archive IS produced correctly, just XFE crashes. The funny part is that if I make a tar,gz or a tar.bz2 it doesn't crash…

    FilePanel.cpp forces a "-v" option to both gzip and bzip2 and that's not a valid option in busybox. I have edited that out but it makes no difference. I have also tried an older 1.16.x version of busybox - no difference. Please notice that the .gz and .bz2 archive is generated correctly, just XFE crashes.

     
  • Jeff Pohlmeyer
    Jeff Pohlmeyer
    2010-09-11

    Is it possible that XFE is stuck waiting to read some output
    from gzip -v, but busybox doesn't provide anything?

    If that's the case, maybe you could wrap the busybox gzip and
    bzip2 commands in a shell script that "fakes" some output.

    I haven't tested this, but it just might work:

    #!/bin/sh

    GZIP=$(which gzip)
    BZIP2=$(which bzip2)
    TAR=$(which tar)

    mkdir -p $HOME/xfe-hack/

    cat << EOF > $HOME/xfe-hack/gzip
    #!/bin/sh
    ${GZIP} "\$@"
    echo \$@
    EOF

    chmod 755 $HOME/xfe-hack/gzip

    cat << EOF > $HOME/xfe-hack/bzip2
    #!/bin/sh
    ${BZIP2} "\$@"
    echo \$@
    EOF

    chmod 755 $HOME/xfe-hack/bzip2

    cat << EOF > $HOME/xfe-hack/tar
    #!/bin/sh
    export PATH=$PATH
    ${TAR} "\$@"
    echo \$@
    EOF

    chmod 755 $HOME/xfe-hack/tar

    export PATH=$HOME/xfe-hack:$PATH

    exec xfe $@

     
  • Kim Michael Eriksen
    Kim Michael Eriksen
    2010-09-11

    Bingo, that was it! Busybox's versions of gzip and bzip2 are completely silent and apparently XFE choke on that. I opted for a slightly more primitive version than the one you suggested as I substituted the sym link gzip -> busybox with this script:

    #!/bin/sh
    echo "Gzip compressing: $@"
    /bin/busybox gzip $@
    exit 0

    Works like a charm. Thanks a lot.

    This is nonetheless a bug in XFE. Do the developers monitor this forum, or should a formal bug report be put forward?

     
  • Roland Baudin
    Roland Baudin
    2010-09-11

    OK, I've seen your bug report and workaround. I'll check this next week. Xfe 1.32.2 with many bug fixes is nearly ready but I'll fix (if I can) your issue.
    Thanks for your interest in Xfe,
    RB

     
  • Kim Michael Eriksen
    Kim Michael Eriksen
    2010-09-11

    If you have 1.32.2 almost ready there is no reason to delay it due to this bug. Now it is documented and it can wait for the following release.

    Thanks a lot for XFE - It's excellent.

     
  • Roland Baudin
    Roland Baudin
    2010-09-15

    I tried to reproduce the bug on my Debian box (replacing /bin/gzip with a link to /bin/busybox), but with no success.
    What system do you use?
    RB