Debian bug report logs - #1358 tar can't extract device numbers stored using cpio -Hustar Package: tar ; Reported by: Ian Jackson ; 47 days old . ----------------------------------------------------------------------- Message received at debian-bugs: From cus.cam.ac.uk!iwj10 Thu Sep 14 12:54:56 1995 Return-Path: Received: from pixar.com by mongo.pixar.com with smtp (Smail3.1.28.1 #15) id m0stKN6-0002DBA; Thu, 14 Sep 95 12:54 PDT Received: from bootes.cus.cam.ac.uk by pixar.com with SMTP id AA22383 (5.67b/IDA-1.5 for debian-bugs-pipe@mongo.pixar.com); Thu, 14 Sep 1995 12:54:37 -0700 Received: by bootes.cus.cam.ac.uk (Smail-3.1.29.0 #36) id m0stKMw-000BzkA; Thu, 14 Sep 95 20:54 BST Received: by chiark id (Debian /\oo/\ Smail3.1.29.1 #29.33); Thu, 14 Sep 95 19:51 BST Message-Id: Date: Thu, 14 Sep 95 19:51 BST From: Ian Jackson To: Debian bugs submission address X-Debian-Cc: Nick Maclaren Subject: tar can't extract device numbers stored using cpio -Hustar Precedence: air-mail Package: tar Version: 1.11.8-1 chiark:~/junk> cd /dev chiark:/dev> echo null | cpio -Hustar -O/u/ian/junk/t -vo null 3 blocks chiark:/dev> tar vvtf ~/junk/t tar: Blocksize = 3 records crw-rw-rw- 0/3 0,0 Mar 30 21:18 1995 null chiark:/dev> cd ~/junk/ chiark:~/junk> really tar vvxf t tar: Blocksize = 3 records crw-rw-rw- 0/3 0,0 Mar 30 21:18 1995 null chiark:~/junk> ll null crw-rw-r-- 1 root sys 0, 0 Mar 30 21:18 null chiark:~/junk> ll /dev/null crw-rw-rw- 1 root sys 1, 3 Mar 30 21:18 /dev/null chiark:~/junk> cpio -tv -Ft crw-rw-rw- 1 root sys 1, 3 Mar 30 21:18 null 2 blocks chiark:~/junk> rm null rm: remove `null', overriding mode 0664? y chiark:~/junk> really cpio -iv -Ft null 2 blocks chiark:~/junk> ll null crw-rw-rw- 1 root sys 1, 3 Sep 14 19:38 null chiark:~/junk> gzip -9v ``8```8Z ` end chiark:~/junk> This is a bug in tar, not cpio. cpio writes the device number fields using something resembling what snprintf(buf,8,"%7o\0",number) would do if null weren't the string terminator. (At least, I think it's octal.) This kind of nastiness in tar headers is common, and tar needs to cope with it. Ian. ----------------------------------------------------------------------- Acknowledgement sent to Ian Jackson : New bug report received and forwarded. Copy sent to Nick Maclaren . Full text available. ----------------------------------------------------------------------- Report forwarded to debian-devel@pixar.com : Bug#1358 ; Package tar . Full text available. ----------------------------------------------------------------------- Ian Jackson / iwj10@thor.cam.ac.uk , with the debian-bugs tracking mechanism This page last modified 07:43:01 GMT Wed 01 Nov