|
From: | Aaron Queenan |
Subject: | [Bug-cpio] GNU cpio 2.12 extracting the wrong contents for a file |
Date: | Thu, 3 May 2018 01:48:40 +0000 |
Dear Sir or Madam, Using GNU cpio 2.12 on a QNAP NAS, I created a cpio archive. When extracting the entire archive, some files were created with the wrong size and wrong data. When extracting those files individually, they are created with the correct size and content. I have reproduced the bug on Ubuntu (under “Bash
on Ubuntu on Windows” feature of Windows 10), Ubuntu:latest under Docker for Windows, and linuxkit-4.9.87. Beyond Compare for Windows however, can extract the file correctly. The commands run were: # uname -a Linux storage 3.4.6 #1 SMP Fri Dec 8 04:33:44 CST 2017 x86_64 unknown # cpio --version cpio (GNU cpio) 2.12 Copyright (C) 2015 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by Phil Nelson, David MacKenzie, John Oleynick, and Sergey Poznyakoff. # (cd source; find . |head -1000 |cpio -o >../cpio-500.cpio) 45425 blocks # (cd target; cpio -ium <../cpio-500.cpio) 45425 blocks # (cd target; l Metadata/TV\ Shows/4/b197ab71973027bf3ec8ba4d120854ceb12594c.bundle/Contents/com.plexapp.agents.thetvdb/seasons/1/episodes/4.xml) -rwxr-xr-x 3 admin administ
75397 Jan 27 2014 Metadata/TV Shows/4/b197ab71973027bf3ec8ba4d120854ceb12594c.bundle/Contents/com.plexapp.agents.thetvdb/seasons/1/episodes/4.xml* # (cd target; cpio -ium Metadata/TV\ Shows/4/b197ab71973027bf3ec8ba4d120854ceb12594c.bundle/Contents/com.plexapp.agents.thetvdb/seasons/1/episodes/4.xml
<../cpio-500.cpio) 45425 blocks # (cd target; l Metadata/TV\ Shows/4/b197ab71973027bf3ec8ba4d120854ceb12594c.bundle/Contents/com.plexapp.agents.thetvdb/seasons/1/episodes/4.xml) -rwxr-xr-x 1 admin administ
1265 Jan 27 2014 Metadata/TV Shows/4/b197ab71973027bf3ec8ba4d120854ceb12594c.bundle/Contents/com.plexapp.agents.thetvdb/seasons/1/episodes/4.xml* Note the different file size depending upon how the file was extracted. The sample archive can be downloaded from
https://www.dropbox.com/s/0t0w9uwu35qs9ue/cpio-500.cpio?dl=0. Kind regards, Aaron Queenan. |
[Prev in Thread] | Current Thread | [Next in Thread] |