bug-tar
[Top][All Lists]
Advanced

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

Re: Issue with creating an archive with reproducible content


From: Jan-Benedict Glaw
Subject: Re: Issue with creating an archive with reproducible content
Date: Sat, 27 Apr 2024 21:48:26 +0200
User-agent: Mutt/1.10.1 (2018-07-13)

On Sat, 2024-04-27 21:23:37 +0200, Jan-Benedict Glaw <jbglaw@lug-owl.de> wrote:
[...]
>     tar     --sort=name                                                       
>                                       \
>             --mtime="@${SOURCE_DATE_EPOCH:-$(date +%s)}"                      
>                                       \
>             --owner=0                                                         
>                                       \
>             --group=0                                                         
>                                       \
>             --numeric-owner                                                   
>                                       \
>             --format=pax                                                      
>                                       \
>             
> --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime,delete=devmajor,delete=devminor
>      \
>             -cf - "${basename_dir}"                                           
>                                       | \
>             gzip -n9 > "${artifacts_dir}/${tarball_filename}"
[...]
>   Do you have any suggestion for me to get rid of the
> devmajor/devminor content in the headers? Or should my approach in
> theory work and it's a small bug that it doesn't remove the "0000000"?

For reference, here's (one relevant chunk of) a diff between two such
tarballs; done with `diff -u20`, we see a full header:

--- 
netbsd-bebox-powerpc-rel-39f3caee78385d617464aabdd9e8cf74ff266692-47.tar.xxd    
    2024-04-27 21:42:22.364199708 +0200
+++ 
nnetbsd-bebox-powerpc-rel-39f3caee78385d617464aabdd9e8cf74ff266692-36.tar.xxd   
    2024-04-27 21:42:37.382995102 +0200
@@ -1,106 +1,106 @@
 00000000: 7265 6c65 6173 652d 6265 626f 782d 706f  release-bebox-po
 00000010: 7765 7270 632f 0000 0000 0000 0000 0000  werpc/..........
 00000020: 0000 0000 0000 0000 0000 0000 0000 0000  ................
 00000030: 0000 0000 0000 0000 0000 0000 0000 0000  ................
 00000040: 0000 0000 0000 0000 0000 0000 0000 0000  ................
 00000050: 0000 0000 0000 0000 0000 0000 0000 0000  ................
 00000060: 0000 0000 3030 3030 3735 3500 3030 3030  ....0000755.0000
 00000070: 3030 3000 3030 3030 3030 3000 3030 3030  000.0000000.0000
 00000080: 3030 3030 3030 3000 3134 3631 3136 3632  0000000.14611662
-00000090: 3130 3400 3031 3231 3737 0020 3500 0000  104.012177. 5...
+00000090: 3130 3400 3031 3334 3337 0020 3500 0000  104.013437. 5...
 000000a0: 0000 0000 0000 0000 0000 0000 0000 0000  ................
 000000b0: 0000 0000 0000 0000 0000 0000 0000 0000  ................
 000000c0: 0000 0000 0000 0000 0000 0000 0000 0000  ................
 000000d0: 0000 0000 0000 0000 0000 0000 0000 0000  ................
 000000e0: 0000 0000 0000 0000 0000 0000 0000 0000  ................
 000000f0: 0000 0000 0000 0000 0000 0000 0000 0000  ................
 00000100: 0075 7374 6172 0030 3000 0000 0000 0000  .ustar.00.......
 00000110: 0000 0000 0000 0000 0000 0000 0000 0000  ................
 00000120: 0000 0000 0000 0000 0000 0000 0000 0000  ................
 00000130: 0000 0000 0000 0000 0000 0000 0000 0000  ................
-00000140: 0000 0000 0000 0000 0000 0000 0000 0000  ................
-00000150: 0000 0000 0000 0000 0000 0000 0000 0000  ................
+00000140: 0000 0000 0000 0000 0030 3030 3030 3030  .........0000000
+00000150: 0030 3030 3030 3030 0000 0000 0000 0000  .0000000........
 00000160: 0000 0000 0000 0000 0000 0000 0000 0000  ................
 00000170: 0000 0000 0000 0000 0000 0000 0000 0000  ................
 00000180: 0000 0000 0000 0000 0000 0000 0000 0000  ................
 00000190: 0000 0000 0000 0000 0000 0000 0000 0000  ................
 000001a0: 0000 0000 0000 0000 0000 0000 0000 0000  ................
 000001b0: 0000 0000 0000 0000 0000 0000 0000 0000  ................
 000001c0: 0000 0000 0000 0000 0000 0000 0000 0000  ................
 000001d0: 0000 0000 0000 0000 0000 0000 0000 0000  ................
 000001e0: 0000 0000 0000 0000 0000 0000 0000 0000  ................
 000001f0: 0000 0000 0000 0000 0000 0000 0000 0000  ................
[...]

Here, you can see the devmajor/devminor difference, as well as a
difference in the checksum (which, I guess, is just a result of the
devmajor/devminor change.)

Thanks,
  Jan-Benedict

-- 

Attachment: signature.asc
Description: PGP signature


reply via email to

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