help-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-tar] How do I create a tar file similar to a sample tar file?


From: Pavel Raiskup
Subject: Re: [Help-tar] How do I create a tar file similar to a sample tar file?
Date: Sat, 08 Nov 2014 15:20:16 +0100
User-agent: KMail/4.14.2 (Linux/3.16.7-200.fc20.x86_64; KDE/4.14.2; x86_64; ; )

On Friday 07 of November 2014 16:44:37 Sean Ansari wrote:
> I want to create an image for the Arm chip and deploy it on my Samsung
> Note 3. I used the following command to create a tar file with md5
> authentication:
>
>   tar cf - aboot.mbn sbl1.mbn rpm.mbn tz.mbn sdi.mbn NON-HLOS.bin \
>       boot.img recovery.img system.img.ext4 | tee tarfile.tar | \
>       md5sum -

I'm not sure what you expect the 'md5sum -' does for you.  It actuall
"just" prints the md5sum to stdout and thus the checksum is not written to
tar file.

> There are two things that concern me with the above output as I am
> comparing tarfile.tar in /experimentalstock directory with
> N900PVPUCNC5_N900PSPTCNC5_N900PVPUCNC5_HOME.tar.md5 file in the
> originalstock/originaltarfile dirctory.

Hmmm, 'tar.md5'?

> 1- tarfile.tar is smaller. I added more modules to the source. But that
> may be explained by the source I started from. I started from the
> Samsung source code which may not contain the telecom provider's files.

There may be several reasons.  Different format, different blocking factor
(see --blocking-factor in GNU info page).  I would check that the contents
are the same (after extraction), not the archive.

> 2- My other concern is the output associated with the file command; for
> tar.file I get: POSIX tar archive (GNU) and for
> N900PVPUCNC5_N900PSPTCNC5_N900PVPUCNC5_HOME.tar.md5 I get POSIX tar
> archive. Is there a difference between the GNU version vs. whatever is
> the default format?

GNU tar archive can be created by some non-standard enhancements, those
should be off by default however.  And if you create the archive with
'tar cf', the archive should be portable and you should be safe.

How the 'file' utility is able to detect that 'GNU tar' created the
archive, I don't know, TBH.  Probably there is some detectable footprint.

> E:footer is wrong
> E:signature verification failed

Well, this is (I blindly bet only, I just do the analysis from your email,
no attempts to reproduce) because you did not put the md5sum to the tar's
footer.  Blindly guessing only now, but have you tried to do something
like the following?

  $ cp your.tar your.tar.md5
  $ md5sum your.tar >> your.tar.md5

Pavel




reply via email to

[Prev in Thread] Current Thread [Next in Thread]