Bug 13036

Summary: busybox ar unable to uncompress archives produced with -D deterministic-archives options from binutils ar
Product: Busybox Reporter: Khem Raj <raj.khem>
Component: OtherAssignee: unassigned
Status: NEW ---    
Severity: normal CC: busybox-cvs
Priority: P5    
Version: 1.33.x   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Host: Target:
Build:

Description Khem Raj 2020-06-24 22:22:04 UTC
Here is test case

$ touch test
$ ar -crfD xx
$ ./busybox_unstripped ar -x ./xx
ar: unrecognized file type


It works ok if the archive is produced using ar -crfU

It seems that the file modes change from 100644 to 0644 in archive header
which confuses busybox ar where its checking 

libarchive/data_extract_all.c

    /* Create the filesystem entry */
      switch (file_header->mode & S_IFMT) {
      case S_IFREG: {
...


and fails this check and reports the above mentioned error.