Arch Linux

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#56895 - {mkinitcpio} create binary identical output on identical input

Attached to Project: Arch Linux
Opened by Ceriel Jacobs (cj1) - Friday, 29 December 2017, 17:07 GMT
Last edited by Dave Reisner (falconindy) - Friday, 29 December 2017, 20:05 GMT
Task Type Feature Request
Category Arch Projects
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


Running `mkinitcpio` with identical input, results in a different output byte steam each and every run. Comparing the initramfs .img files with `cmp` shows already a different after the 4th byte.

The root cause might need to be fixed in `cpio`.

Guess: different inode numbers (char c_ino[8]; in cpio_newc_header) on every run.

struct cpio_newc_header {
char c_magic[6];
char c_ino[8];
char c_mode[8];
char c_uid[8];
char c_gid[8];
char c_nlink[8];
char c_mtime[8];
char c_filesize[8];
char c_devmajor[8];
char c_devminor[8];
char c_rdevmajor[8];
char c_rdevminor[8];
char c_namesize[8];
char c_check[8];

Additional info:
* mkinitcpio 24

Steps to reproduce:
$ mkinitcpio -P
$ cp initramfs-linux.img{,~}
$ mkinitcpio -P
$ cmp -l /boot/initramfs-linux.img /boot/initramfs-linux.img~
This task depends upon

Closed by  Dave Reisner (falconindy)
Friday, 29 December 2017, 20:05 GMT
Reason for closing:  Duplicate
Additional comments about closing:   FS#56128