use strict;

# Make inode number, link info and mtime consistent in order to get a consistent hash.
#
# Author: Alexander Kjeldaas <ak@formalprivacy.com>

use Archive::Cpio;

my $cpio = Archive::Cpio->new;
my $IN = \*STDIN;
my $ino = 1;
$cpio->read_with_handler($IN, sub {
        my ($e) = @_;
        $e->{inode} = $ino;
        $ino++;
        $e->{nlink} = 1;
        $e->{mtime} = 1;
	$cpio->write_one(\*STDOUT, $e);
    });
$cpio->write_trailer(\*STDOUT);

use strict;

# Make inode number, link info and mtime consistent in order to get a consistent hash.
#
# Author: Alexander Kjeldaas <ak@formalprivacy.com>

use Archive::Cpio;

my $cpio = Archive::Cpio->new;
my $IN = \*STDIN;
my $ino = 1;
$cpio->read_with_handler($IN, sub {
        my ($e) = @_;
        $e->{mtime} = 1;
	$cpio->write_one(\*STDOUT, $e);
    });
$cpio->write_trailer(\*STDOUT);

Fix initrd breaking by recent repeatable-builds changes
Fix initrd breaking by recent repeatable-builds changes

See the comments at https://github.com/NixOS/nixpkgs/commit/f67015cae49400eba539b9ec8b9920643581c77c
for more information.

Please note: this makes initrd unrepeatable again, but most people will prefer that above an unbootable system.
