Bug 267298 - Compress as tar xz in reality compress in tar.gz
Summary: Compress as tar xz in reality compress in tar.gz
Status: RESOLVED DUPLICATE of bug 271553
Alias: None
Product: ark
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Raphael Kubo da Costa
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-28 13:03 UTC by BRULE Herman
Modified: 2011-05-08 18:17 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Proposed fix. (1.29 KB, patch)
2011-05-08 18:14 UTC, Raphael Kubo da Costa
Details

Note You need to log in before you can comment on or make changes to this bug.
Description BRULE Herman 2011-02-28 13:03:14 UTC
Version:           unspecified (using KDE 4.5.5) 
OS:                Linux

Hello, I do right click on folder, compress > compress to...
I select write: file.tar.xz it select the write format, but the archive is compressed as tar.gzip (verified by rename and "file" command).
Thanks to fix it.

Reproducible: Always
Comment 1 Raphael Kubo da Costa 2011-03-01 19:05:00 UTC
Weird, this is bug 231100, which was fixed a long time ago. Is your libarchive capable of handling xz archives? I think you need libarchive >= 2.7.0 for that.
Comment 2 BRULE Herman 2011-03-01 19:19:09 UTC
I use: 2.7.1-r1 under gentoo.
app-arch/libarchive-2.7.1-r1  USE="bzip2 lzma static-libs zlib -acl -static -xattr" 0 kB
Comment 3 Raphael Kubo da Costa 2011-03-01 19:24:32 UTC
Are you able to list/extract xz files just fine, either with Ark or bsdtar?
Comment 4 BRULE Herman 2011-03-01 20:05:04 UTC
With a archive .tar.xz, I right click, extract to the sub folder: work perfectly.
Same with ark.
Comment 5 Raphael Kubo da Costa 2011-03-01 20:24:28 UTC
This is really weird. Are you really on 4.5.5? Would it be possible for you to try updating your version? Or could you try building Ark (and maybe kdelibs) with debug symbols in order to get some debug output on the terminal?
Comment 6 BRULE Herman 2011-03-01 20:37:37 UTC
The branch 4.6 is too instable, I will wait. But I'm in kde 4.5.5.
I have all my system with debug symbols, how I can get debug output on the terminal?
Comment 7 Raphael Kubo da Costa 2011-03-01 20:54:02 UTC
Run "kdebugdialog" and make sure the debug areas for Ark are enabled. After that, try compressing something with "ark --add --changetofirstpath --dialog <FILE OR DIRECTORY>", which is the same as choosing "compress -> compress to..." with the right mouse button.

If you type 'foo.tar.xz' as the file name in the dialog, the extension should change to "Tar archive (XZ-compressed)". After that, click OK. You should have a lot of debug output in the terminal you ran Ark from.

There should be a line saying

  ark(22987) LibArchiveInterface::addFiles: Detected xz compression for new file

In your case, for some reason, I suppose it says

  "Falling back to gzip"

If it does, can you try check if 'grep archive_write_set_compression_xz /usr/lib/libarchive.so' finds a match?
Comment 8 BRULE Herman 2011-03-01 21:03:16 UTC
With this command I have in console:
ark(6528) Kerfuffle::AddToArchive::showAddDialog: Returned URL: KUrl("file:///home/user/toto.tar.xz")                                                                                                                                        
ark(6528) Kerfuffle::AddToArchive::showAddDialog: Returned mime: "application/x-xz-compressed-tar"                                                                                                                                           
ark(6528) main: Entering application loop                                                                                                                                                                                                    
ark(6528) Kerfuffle::AddToArchive::slotStartJob:                                                                                                                                                                                             
ark(6528) Kerfuffle::factory: Loading plugin "kerfuffle_libarchive"                                                                                                                                                                          
ark(6528) Kerfuffle::ReadOnlyArchiveInterface::ReadOnlyArchiveInterface:                                                                                                                                                                     
ark(6528) Kerfuffle::AddToArchive::slotStartJob: "Set filename to /home/user/toto.tar.xz"                                                                                                                                                    
ark(6528) Kerfuffle::AddToArchive::slotStartJob: Setting GlobalWorkDir to  "/home/user"                                                                                                                                                      
ark(6528) KSharedUiServerProxy::KSharedUiServerProxy: kuiserver registered                                                                                                                                                                   
ark(6528) LibArchiveInterface::addFiles: GlobalWorkDir is set, changing dir to  "/home/user"
ark(6528) LibArchiveInterface::addFiles: Falling back to gzip
ark(6528) LibArchiveInterface::writeFile: Writing new entry  torrent/
ark(6528) LibArchiveInterface::writeFile: Writing new entry  torrent/Text File
ark(6528) Kerfuffle::Job::onFinished: true
ark(6528) Kerfuffle::AddToArchive::slotFinished:

grep archive_write_set_compression_xz /usr/lib/libarchive.so found nothing.
Ark can disable the combobox entry tar + xz if not supported (better than failing back to other type)?
Comment 9 Raphael Kubo da Costa 2011-05-08 18:14:39 UTC
Created attachment 59775 [details]
Proposed fix.

OK, I think I finally understood what's going on.

Can you guys test this patch and check if it fixes the issue for you?
Comment 10 Raphael Kubo da Costa 2011-05-08 18:17:11 UTC
Wrong bug report, but the patch is valid for this one too ;)

I think the same issue is being tracked in bug 271553. I'm marking this one as a duplicate instead of the opposite because the discussion there is longer and more detailed.

Feel free to test the patch as well, as it should fix the issue.

*** This bug has been marked as a duplicate of bug 271553 ***