cabextract package.xml

cabextract package.xml

Postby mani » 12.12.2018, 15:50

dear All
I have a strange problem for two months and found now the problem and a dirty solution. Last month I extracted package.xml manually, because I thought it was my mistake with playing around with user rights

I had (after a new download of wsusscn2.cab and extraction of package.cab) every time a break-up of the download script with:
Failure: The file package.xml could not be extracted. The script cannot continue without this file.

cabextract and 7z (also under Windows) complaining that package.cab is not a valid cabinet
Server2:/tmp/download-updates.BK21KnMq7k# cabextract -F package.xml package.cab
package.cab: no valid cabinets found

All done, errors in processing 1 file(s)


When i extracted the full wsusscn2.cab into the tmp directory I could also extract package.cab..........
therefore I change line 57 from 50-superseded-updates.bash
if cabextract -d "${temp_dir}" -F "package.cab" "../client/wsus/wsusscn2.cab"

to
if cabextract -d "${temp_dir}" "../client/wsus/wsusscn2.cab"

and the the December download is running now.

My Linux is Debian-386 (buster)
cabextract 1.9-1 (also tested 1.6-1+b1)
p7zip 16.02+dfsg-6

Herzliche Grüße
Mani
mani
 
Posts: 13
Joined: 04.04.2017, 15:50

Re: cabextract package.xml

Postby hbuhrmester » 12.12.2018, 19:58

I just tested it again with Debian 9 Stretch, but everything worked as usual. The file wsusscn2.cab was downloaded and extracted without problems:

Code: Select all
Info: Extracting Microsoft's update catalog file (ignore any warnings about extra bytes at end of
file)...
../client/wsus/wsusscn2.cab: WARNING; possible 16064 extra bytes at end of file.
Extracting cabinet: ../client/wsus/wsusscn2.cab
  extracting /tmp/download-updates.qQd9nxETfU/package.cab

All done, no errors.
Extracting cabinet: /tmp/download-updates.qQd9nxETfU/package.cab
  extracting ../cache/package.xml

All done, no errors.
Info: The file package.xml was extracted successfully.


Neither cabextract nor 7z reported any errors with the intermediate file package.cab:

Code: Select all
~/tmp$ cabextract -t package.cab
Testing cabinet: package.cab
  package.xml  OK                              c3e24425527db53f6bb4f7498287b15b

All done, no errors.


Code: Select all
/tmp$ 7z t package.cab

7-Zip [32] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=de_DE.UTF-8,Utf16=on,HugeFiles=on,32 bits,1 CPU GenuineIntel (68A),ASM)

Scanning the drive for archives:
1 file, 10805888 bytes (11 MiB)

Testing archive: package.cab
--
Path = package.cab
Type = Cab
Physical Size = 10805888
Method = LZX:21
Blocks = 1
Volumes = 1
Volume Index = 0
ID = 0

Everything is Ok

Size:       90317070
Compressed: 10805888


The extracted file package.xml also looks complete, as judged by the opening and closing tags "OfflineSyncPackage":

Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<OfflineSyncPackage xmlns="http://schemas.microsoft.com/msus/2004/02/OfflineSync" MinimumClientVersion="5.8.0.2678" ProtocolVersion="1.0" PackageId="1f166266-dcc8-4ad9-b881-20bc95432153" SourceId="cc56dcba-9026-4399-8535-7a3c9bed7086" CreationDate="2018-12-10T21:57:51Z" PackageVersion="1.1">
...
</OfflineSyncPackage>


The tested archive wsusscn2.cab was modified on 2018-12-11, 12:39 (GMT +1). The fingerprint in the file client/md/hashes-wsus.txt is:

Code: Select all
482287090,74adff81dad821e924339e38d4ef4f94,15bd91feca483c476bd86238a4906bc3d13ec319,224c4491d766770d7a597509702944eb34418fe2b990b0a0edae5bd71de43b61,..\wsus\wsusscn2.cab


This means:

Code: Select all
File size=482287090
MD5=74adff81dad821e924339e38d4ef4f94
SHA1=15bd91feca483c476bd86238a4906bc3d13ec319
SHA256=224c4491d766770d7a597509702944eb34418fe2b990b0a0edae5bd71de43b61




But right after the official patch day, which was yesterday, there may be broken or intermediate files in the content delivery network. This sometimes causes problems with the verification and extraction of the files. This is hardly ever reproducible, and the problems go away by itself after one or two days.


I think, that intermediate files can be identified by an ETag with the option W/. This means something like "the content is compatible but not binary identical". This may be used for blogs and forums. For example, this forum has some statistics about the number of visitors on each page. Then two downloads of the same page may be different, but if the main content – the articles on the page – is the same, then the page can be treated as identical for all practical purposes.

But such semantics would surely be wrong for the download of binary files. Thus, you could browse the download log for possibly broken files:

Code: Select all
grep ETag download.log


The server response is printed for the virus definitions files and the WSUS catalog file wsusscn2.cab, because these files sometimes make problems.



I tested this on Debian 9 Stretch with the versions:

  • cabextract 1.6-1+b1
  • p7zip 16.02+dfsg-3+deb9u1

I don't know, if cabextract from Debian 10 Buster works differently, and you said, that you also tried version 1.6-1+b1 yourself.

But the file package.cab is only the first part of a multipart archive, and maybe cabextract 1.9-1 keeps searching for the remaining parts package2.cab to package64.cab. Then, if the problem persists, you could try adding the option -s:

Code: Select all
-s     When testing, listing or extracting cabinets which span multiple
       files,  only  cabinet  files  given on the command line shall be
       used.


e.g. try the command:

Code: Select all
cabextract -s -F package.xml package.cab


Greetings,
hbuhrmester
hbuhrmester
 
Posts: 368
Joined: 11.10.2013, 20:59

Re: cabextract package.xml

Postby mani » 13.12.2018, 12:31

Thanks for your help.
I had to dig a little bit deeper, because I had still the problem with the option F and after comparing package.cab I found that with option F the size is correct, but it starts with <INDEX VERSION="1"><CABLIST XOR="0"><CAB NAME="package.cab" /><CAB NAME="package2.cab" instead of MSCF.

the problem is the libmspack0 with version 0.8-1
After exchanging it to 0.9.1-1 everything is working again

Thanks again
Mani
mani
 
Posts: 13
Joined: 04.04.2017, 15:50

Re: cabextract package.xml

Postby hbuhrmester » 13.12.2018, 14:06

The additional text would be the beginning of the file index.xml, which is the very first file in the archive wsusscn2.cab:

Code: Select all
$ cabextract -l wsusscn2.cab
wsusscn2.cab: WARNING; possible 16064 extra bytes at end of file.
Viewing cabinet: wsusscn2.cab
 File size | Date       Time     | Name
-----------+---------------------+-------------
      3199 | 10.12.2018 23:15:42 | index.xml
  10805888 | 10.12.2018 17:30:52 | package.cab
   2195353 | 10.12.2018 17:33:04 | package2.cab
   1332287 | 10.12.2018 17:35:04 | package3.cab
   1852153 | 10.12.2018 17:37:10 | package4.cab
   1341973 | 10.12.2018 17:39:26 | package5.cab
   1474904 | 10.12.2018 17:41:44 | package6.cab
   1703064 | 10.12.2018 17:43:48 | package7.cab
   1356331 | 10.12.2018 17:45:52 | package8.cab
   1484214 | 10.12.2018 17:48:06 | package9.cab
   1348356 | 10.12.2018 17:50:06 | package10.cab
   2255140 | 10.12.2018 17:52:32 | package11.cab
   1734273 | 10.12.2018 17:54:52 | package12.cab
   1754641 | 10.12.2018 17:57:12 | package13.cab
   1874254 | 10.12.2018 17:59:28 | package14.cab
   1548231 | 10.12.2018 18:01:46 | package15.cab
   1805852 | 10.12.2018 18:04:06 | package16.cab
   1974097 | 10.12.2018 18:06:36 | package17.cab
   2156851 | 10.12.2018 18:08:54 | package18.cab
   2170864 | 10.12.2018 18:11:12 | package19.cab
   3102609 | 10.12.2018 18:13:40 | package20.cab
   2435672 | 10.12.2018 18:15:56 | package21.cab
   2005793 | 10.12.2018 18:18:14 | package22.cab
   3388878 | 10.12.2018 18:21:04 | package23.cab
   2443413 | 10.12.2018 18:23:48 | package24.cab
   3348889 | 10.12.2018 18:27:02 | package25.cab
   3316209 | 10.12.2018 18:30:38 | package26.cab
   1975454 | 10.12.2018 18:33:14 | package27.cab
   2410454 | 10.12.2018 18:36:20 | package28.cab
   2778276 | 10.12.2018 18:39:56 | package29.cab
   1552281 | 10.12.2018 18:42:16 | package30.cab
   2466577 | 10.12.2018 18:45:22 | package31.cab
   3445132 | 10.12.2018 18:48:28 | package32.cab
   5417095 | 10.12.2018 18:52:34 | package33.cab
   5116266 | 10.12.2018 18:56:46 | package34.cab
   4677643 | 10.12.2018 19:00:50 | package35.cab
   7163468 | 10.12.2018 19:05:46 | package36.cab
   6000402 | 10.12.2018 19:10:44 | package37.cab
   3016988 | 10.12.2018 19:14:08 | package38.cab
   4428011 | 10.12.2018 19:18:12 | package39.cab
   6474392 | 10.12.2018 19:23:08 | package40.cab
   4096723 | 10.12.2018 19:26:54 | package41.cab
   4824592 | 10.12.2018 19:31:16 | package42.cab
   4922162 | 10.12.2018 19:35:28 | package43.cab
   3330992 | 10.12.2018 19:39:04 | package44.cab
   2991941 | 10.12.2018 19:42:50 | package45.cab
   3438076 | 10.12.2018 19:46:30 | package46.cab
   3609580 | 10.12.2018 19:50:40 | package47.cab
   8772747 | 10.12.2018 19:56:36 | package48.cab
  29262035 | 10.12.2018 20:12:14 | package49.cab
  15118520 | 10.12.2018 20:20:28 | package50.cab
  12375649 | 10.12.2018 20:27:26 | package51.cab
  12669704 | 10.12.2018 20:35:12 | package52.cab
  29784102 | 10.12.2018 20:51:08 | package53.cab
  23462917 | 10.12.2018 21:04:18 | package54.cab
  27904653 | 10.12.2018 21:18:32 | package55.cab
  15175912 | 10.12.2018 21:26:42 | package56.cab
  20885572 | 10.12.2018 21:37:22 | package57.cab
  34400816 | 10.12.2018 21:54:02 | package58.cab
  18570470 | 10.12.2018 22:04:12 | package59.cab
  37385785 | 10.12.2018 22:22:58 | package60.cab
  39496723 | 10.12.2018 22:42:22 | package61.cab
  36730607 | 10.12.2018 23:01:54 | package62.cab
  20442294 | 10.12.2018 23:13:04 | package63.cab
   5896207 | 10.12.2018 23:15:42 | package64.cab

All done, no errors.


Code: Select all
$ file index.xml
index.xml: UTF-8 Unicode (with BOM) text, with very long lines, with no line terminators


Code: Select all
$ xmlstarlet format index.xml
<?xml version="1.0"?>
<INDEX VERSION="1">
  <CABLIST XOR="0">
    <CAB NAME="package.cab"/>
    <CAB NAME="package2.cab" RANGESTART="0" FILESDIR="1"/>
    <CAB NAME="package3.cab" RANGESTART="182488"/>
    <CAB NAME="package4.cab" RANGESTART="255858"/>
    <CAB NAME="package5.cab" RANGESTART="310157"/>
    <CAB NAME="package6.cab" RANGESTART="431004"/>
    <CAB NAME="package7.cab" RANGESTART="721421"/>
    <CAB NAME="package8.cab" RANGESTART="1240601"/>
    <CAB NAME="package9.cab" RANGESTART="1758587"/>
    <CAB NAME="package10.cab" RANGESTART="2609961"/>
    <CAB NAME="package11.cab" RANGESTART="2930172"/>
    <CAB NAME="package12.cab" RANGESTART="3375708"/>
    <CAB NAME="package13.cab" RANGESTART="3703639"/>
    <CAB NAME="package14.cab" RANGESTART="3987675"/>
    <CAB NAME="package15.cab" RANGESTART="4077614"/>
    <CAB NAME="package16.cab" RANGESTART="4168177"/>
    <CAB NAME="package17.cab" RANGESTART="4750228"/>
    <CAB NAME="package18.cab" RANGESTART="4891325"/>
    <CAB NAME="package19.cab" RANGESTART="4967778"/>
    <CAB NAME="package20.cab" RANGESTART="4976157"/>
    <CAB NAME="package21.cab" RANGESTART="4979131"/>
    <CAB NAME="package22.cab" RANGESTART="4981666"/>
    <CAB NAME="package23.cab" RANGESTART="4984243"/>
    <CAB NAME="package24.cab" RANGESTART="5778372"/>
    <CAB NAME="package25.cab" RANGESTART="6209140"/>
    <CAB NAME="package26.cab" RANGESTART="7060193"/>
    <CAB NAME="package27.cab" RANGESTART="8505297"/>
    <CAB NAME="package28.cab" RANGESTART="8854037"/>
    <CAB NAME="package29.cab" RANGESTART="9622681"/>
    <CAB NAME="package30.cab" RANGESTART="10003137"/>
    <CAB NAME="package31.cab" RANGESTART="11150872"/>
    <CAB NAME="package32.cab" RANGESTART="11961254"/>
    <CAB NAME="package33.cab" RANGESTART="12408138"/>
    <CAB NAME="package34.cab" RANGESTART="13526104"/>
    <CAB NAME="package35.cab" RANGESTART="15367275"/>
    <CAB NAME="package36.cab" RANGESTART="16098973"/>
    <CAB NAME="package37.cab" RANGESTART="16750270"/>
    <CAB NAME="package38.cab" RANGESTART="17460146"/>
    <CAB NAME="package39.cab" RANGESTART="17712387"/>
    <CAB NAME="package40.cab" RANGESTART="18274184"/>
    <CAB NAME="package41.cab" RANGESTART="18544282"/>
    <CAB NAME="package42.cab" RANGESTART="19304446"/>
    <CAB NAME="package43.cab" RANGESTART="19628270"/>
    <CAB NAME="package44.cab" RANGESTART="20063496"/>
    <CAB NAME="package45.cab" RANGESTART="20552001"/>
    <CAB NAME="package46.cab" RANGESTART="20831858"/>
    <CAB NAME="package47.cab" RANGESTART="21524110"/>
    <CAB NAME="package48.cab" RANGESTART="22157185"/>
    <CAB NAME="package49.cab" RANGESTART="23034860"/>
    <CAB NAME="package50.cab" RANGESTART="24409614"/>
    <CAB NAME="package51.cab" RANGESTART="24859200"/>
    <CAB NAME="package52.cab" RANGESTART="25093985"/>
    <CAB NAME="package53.cab" RANGESTART="25211784"/>
    <CAB NAME="package54.cab" RANGESTART="25546171"/>
    <CAB NAME="package55.cab" RANGESTART="25786246"/>
    <CAB NAME="package56.cab" RANGESTART="25901858"/>
    <CAB NAME="package57.cab" RANGESTART="26005332"/>
    <CAB NAME="package58.cab" RANGESTART="26312574"/>
    <CAB NAME="package59.cab" RANGESTART="26568547"/>
    <CAB NAME="package60.cab" RANGESTART="26754039"/>
    <CAB NAME="package61.cab" RANGESTART="27063357"/>
    <CAB NAME="package62.cab" RANGESTART="27464022"/>
    <CAB NAME="package63.cab" RANGESTART="27716542"/>
    <CAB NAME="package64.cab" RANGESTART="27910907"/>
  </CABLIST>
</INDEX>


Then it seems, that cabextract 1.9-1 with some older library libmspack0 messes up the file contents of the first two files in the archive.

But this may be the problem with Debian testing: packages don't advance synchronously. As a rolling release, Debian unstable (Sid) may even work better. From a disussion on Reddit:

I wouldn't really recommend Testing. It might sounds nice because you get software updated only if people using Unstable don't report any issues with it afrer 7 days of use, but it's not really all to it. Because of this process, you might get only some of your software updated, but not other because it's blocked by a bug in Unstable, and the new software you got might not play nicely with the old one that didn't get updated. I had half of KDE updated to a new version and half not like that. It's a weird experience. There are also freezes and a ton of updates from Unstable once Testing gets unfrozen.

https://www.reddit.com/r/linux/comments/79cd2c/debian/


There is also a relevant bugreport, which was just closed on 09 Dec 2018:

— cabextract: -F option doesn't work correctly.
https://bugs.debian.org/cgi-bin/bugrepo ... bug=914263

Greetings,
hbuhrmester
hbuhrmester
 
Posts: 368
Joined: 11.10.2013, 20:59

Re: cabextract package.xml

Postby slycordinator » 23.02.2019, 07:52

It's of note that even if you have the updated version of cabextract, it'll still fail.

The bug report notes that you also need the package libmspack0 to be at least version 0.9.1, which currently is only in the unstable branch of debian. After I installed libmspack0 0.9.1-1 from unstable, all worked fine.
slycordinator
 
Posts: 8
Joined: 23.02.2019, 07:48


Return to Linux

Who is online

Users browsing this forum: No registered users and 1 guest