Package: mdadm
Version: 4.1-10
Severity: wishlist
Tags: patch d-i unreproducible
Hello maintainer of mdadm,
would you consider the attached patch? It fixes two issues that I encounter
while building the Debian live images.
(See also https://wiki.debian.org/ReproducibleInstalls/LiveImages)
1) mkconf adds a timestamp to the generated configuration file.
If $SOURCE_DATE_EPOCH is set (which will be the case when building an
image), it will use that timestamp instead of 'now.
2) The initramfs hook leaves the temporary file.
The temporary file can be deleted.
With kind regards,
Roland Clobus
Working on reproducible live images.
-- Package-specific info:
WARNING:
the following output was not generated by the root user. If you can, please
replace the following up until "-- System Information:" with the output of
/usr/share/bug/mdadm/script 3>&1
run as root. Thanks!
--- mdadm.conf
HOMEHOST <system>
MAILADDR root
--- /etc/default/mdadm
AUTOCHECK=true
AUTOSCAN=true
START_DAEMON=true
DAEMON_OPTIONS="--syslog"
VERBOSE=false
--- /proc/mdstat:
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4]
[raid10]
unused devices: <none>
--- /proc/partitions:
major minor #blocks name
8 16 3907018584 sdb
8 17 3907016704 sdb1
8 0 488386584 sda
8 1 218591232 sda1
8 2 244193280 sda2
8 3 25600000 sda3
11 0 4752640 sr0
8 48 125927424 sdd
7 0 33554432 loop0
--- LVM physical volumes:
LVM does not seem to be used.
--- mount output
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs
(rw,nosuid,noexec,relatime,size=8109380k,nr_inodes=2027345,mode=755)
devpts on /dev/pts type devpts
(rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs
(rw,nosuid,nodev,noexec,relatime,size=1627300k,mode=755)
/dev/sda2 on / type ext4 (rw,relatime,errors=remount-ro)
securityfs on /sys/kernel/security type securityfs
(rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
cgroup2 on /sys/fs/cgroup type cgroup2
(rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
none on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs
(rw,relatime,fd=29,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=16554)
tracefs on /sys/kernel/tracing type tracefs (rw,nosuid,nodev,noexec,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,size=8136492k,nr_inodes=409600)
sunrpc on /run/rpc_pipefs type rpc_pipefs (rw,relatime)
fusectl on /sys/fs/fuse/connections type fusectl
(rw,nosuid,nodev,noexec,relatime)
configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
/dev/sdb1 on /media/data type ext4 (rw,nosuid,nodev,noexec,relatime,user)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc
(rw,nosuid,nodev,noexec,relatime)
tmpfs on /run/user/1000 type tmpfs
(rw,nosuid,nodev,relatime,size=1627296k,nr_inodes=406824,mode=700,uid=1000,gid=1000)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse
(rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
/dev/sdd on /media/roland/128GB type exfat
(rw,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0022,dmask=0022,iocharset=utf8,errors=remount-ro,uhelper=udisks2)
/dev/sr0 on /media/cdrom type udf
(ro,nosuid,nodev,noexec,relatime,utf8,user=roland)
/media/data/mytmp.img on /dev/shm/tmp2 type ext4 (rw,relatime)
--- initrd.img-5.10.0-3-amd64:
gzip: /boot/initrd.img-5.10.0-3-amd64: not in gzip format
cpio: premature end of archive
--- initrd's /conf/conf.d/md:
no conf/md file.
--- /proc/modules:
raid10 65536 0 - Live 0x0000000000000000
raid456 180224 0 - Live 0x0000000000000000
async_raid6_recov 24576 1 raid456, Live 0x0000000000000000
async_memcpy 20480 2 raid456,async_raid6_recov, Live 0x0000000000000000
async_pq 20480 2 raid456,async_raid6_recov, Live 0x0000000000000000
async_xor 20480 3 raid456,async_raid6_recov,async_pq, Live 0x0000000000000000
async_tx 20480 5 raid456,async_raid6_recov,async_memcpy,async_pq,async_xor,
Live 0x0000000000000000
raid6_pq 122880 4 btrfs,raid456,async_raid6_recov,async_pq, Live
0x0000000000000000
libcrc32c 16384 5 nf_nat,nf_conntrack,nf_tables,btrfs,raid456, Live
0x0000000000000000
raid1 53248 0 - Live 0x0000000000000000
raid0 24576 0 - Live 0x0000000000000000
multipath 20480 0 - Live 0x0000000000000000
linear 20480 0 - Live 0x0000000000000000
md_mod 180224 6 raid10,raid456,raid1,raid0,multipath,linear, Live
0x0000000000000000
syslog not readable by user.
--- volume detail:
/dev/sda not readable by user.
/dev/sda1 not readable by user.
/dev/sda2 not readable by user.
/dev/sda3 not readable by user.
/dev/sdb not readable by user.
/dev/sdb1 not readable by user.
/dev/sdc not readable by user.
/dev/sdd not readable by user.
/dev/sde not readable by user.
--- /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-5.10.0-3-amd64
root=UUID=fb68085e-7d0c-4c45-9803-d2e25d9c9476 ro quiet pci=nomsi,noaer
--- grub2:
set root='hd1,msdos2'
set root='hd1,msdos2'
set root='hd1,msdos2'
linux /boot/vmlinuz-5.10.0-3-amd64
root=UUID=fb68085e-7d0c-4c45-9803-d2e25d9c9476 ro quiet pci=nomsi,noaer
set root='hd1,msdos2'
linux /boot/vmlinuz-5.10.0-3-amd64
root=UUID=fb68085e-7d0c-4c45-9803-d2e25d9c9476 ro quiet pci=nomsi,noaer
set root='hd1,msdos2'
linux /boot/vmlinuz-5.10.0-3-amd64
root=UUID=fb68085e-7d0c-4c45-9803-d2e25d9c9476 ro single
set root='hd1,msdos1'
--- udev:
ii udev 247.3-1 amd64 /dev/ and hotplug management daemon
9d7dfcdc58fa54941f8d28f6094a7a5b /lib/udev/rules.d/01-md-raid-creating.rules
aa83f41de49462d05e446cfc5e14e74b /lib/udev/rules.d/63-md-raid-arrays.rules
904bb2cce2cfd4a2c94aa957e7968e16 /lib/udev/rules.d/64-md-raid-assembly.rules
ba1d376ca9b7364576f950d06ba18207
/lib/udev/rules.d/69-md-clustered-confirm-device.rules
97e15ed0a5cdaed8c6b3bd12d5ecc745 /lib/udev/rules.d/99-systemd.rules
--- /dev:
/dev/disk/by-id:
total 0
lrwxrwxrwx 1 root root 9 Feb 12 07:19
ata-HL-DT-ST_DVDRAM_GH22LS50_895263AF06E0 -> ../../sr0
lrwxrwxrwx 1 root root 9 Feb 12 07:19 ata-ST4000DX001-1CE168_Z3014BS3 ->
../../sdb
lrwxrwxrwx 1 root root 10 Feb 12 07:19 ata-ST4000DX001-1CE168_Z3014BS3-part1 ->
../../sdb1
lrwxrwxrwx 1 root root 9 Feb 12 07:19
ata-Samsung_SSD_840_EVO_500GB_S1DHNSAF103775B -> ../../sda
lrwxrwxrwx 1 root root 10 Feb 12 07:19
ata-Samsung_SSD_840_EVO_500GB_S1DHNSAF103775B-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Feb 12 07:19
ata-Samsung_SSD_840_EVO_500GB_S1DHNSAF103775B-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Feb 12 07:19
ata-Samsung_SSD_840_EVO_500GB_S1DHNSAF103775B-part3 -> ../../sda3
lrwxrwxrwx 1 root root 9 Feb 12 07:19 usb-Generic_STORAGE_DEVICE_000000082-0:0
-> ../../sdc
lrwxrwxrwx 1 root root 9 Feb 12 07:19 usb-Generic_STORAGE_DEVICE_000000082-0:1
-> ../../sdd
lrwxrwxrwx 1 root root 9 Feb 12 07:19 usb-Generic_STORAGE_DEVICE_000000082-0:2
-> ../../sde
lrwxrwxrwx 1 root root 9 Feb 12 07:19 wwn-0x5000c5006560d942 -> ../../sdb
lrwxrwxrwx 1 root root 10 Feb 12 07:19 wwn-0x5000c5006560d942-part1 ->
../../sdb1
lrwxrwxrwx 1 root root 9 Feb 12 07:19 wwn-0x5001480000000000 -> ../../sr0
lrwxrwxrwx 1 root root 9 Feb 12 07:19 wwn-0x50025388a01b3460 -> ../../sda
lrwxrwxrwx 1 root root 10 Feb 12 07:19 wwn-0x50025388a01b3460-part1 ->
../../sda1
lrwxrwxrwx 1 root root 10 Feb 12 07:19 wwn-0x50025388a01b3460-part2 ->
../../sda2
lrwxrwxrwx 1 root root 10 Feb 12 07:19 wwn-0x50025388a01b3460-part3 ->
../../sda3
/dev/disk/by-label:
total 0
lrwxrwxrwx 1 root root 9 Feb 12 07:19 128GB -> ../../sdd
lrwxrwxrwx 1 root root 9 Feb 12 07:19 ANDROMEDAS2_D6 -> ../../sr0
lrwxrwxrwx 1 root root 10 Feb 12 07:19 WINXP -> ../../sda3
lrwxrwxrwx 1 root root 10 Feb 12 07:19 data -> ../../sdb1
lrwxrwxrwx 1 root root 10 Feb 12 07:19 windows -> ../../sda1
/dev/disk/by-partuuid:
total 0
lrwxrwxrwx 1 root root 10 Feb 12 07:19 00042529-01 -> ../../sda1
lrwxrwxrwx 1 root root 10 Feb 12 07:19 00042529-02 -> ../../sda2
lrwxrwxrwx 1 root root 10 Feb 12 07:19 00042529-03 -> ../../sda3
lrwxrwxrwx 1 root root 10 Feb 12 07:19 ce97abe1-bdae-4991-a2f0-fce597cf8316 ->
../../sdb1
/dev/disk/by-path:
total 0
lrwxrwxrwx 1 root root 9 Feb 12 07:19
pci-0000:00:14.0-usb-0:1.2:1.0-scsi-0:0:0:0 -> ../../sdc
lrwxrwxrwx 1 root root 9 Feb 12 07:19
pci-0000:00:14.0-usb-0:1.2:1.0-scsi-0:0:0:1 -> ../../sdd
lrwxrwxrwx 1 root root 9 Feb 12 07:19
pci-0000:00:14.0-usb-0:1.2:1.0-scsi-0:0:0:2 -> ../../sde
lrwxrwxrwx 1 root root 9 Feb 12 07:19 pci-0000:00:1f.2-ata-1 -> ../../sda
lrwxrwxrwx 1 root root 10 Feb 12 07:19 pci-0000:00:1f.2-ata-1-part1 ->
../../sda1
lrwxrwxrwx 1 root root 10 Feb 12 07:19 pci-0000:00:1f.2-ata-1-part2 ->
../../sda2
lrwxrwxrwx 1 root root 10 Feb 12 07:19 pci-0000:00:1f.2-ata-1-part3 ->
../../sda3
lrwxrwxrwx 1 root root 9 Feb 12 07:19 pci-0000:00:1f.2-ata-1.0 -> ../../sda
lrwxrwxrwx 1 root root 10 Feb 12 07:19 pci-0000:00:1f.2-ata-1.0-part1 ->
../../sda1
lrwxrwxrwx 1 root root 10 Feb 12 07:19 pci-0000:00:1f.2-ata-1.0-part2 ->
../../sda2
lrwxrwxrwx 1 root root 10 Feb 12 07:19 pci-0000:00:1f.2-ata-1.0-part3 ->
../../sda3
lrwxrwxrwx 1 root root 9 Feb 12 07:19 pci-0000:00:1f.2-ata-2 -> ../../sdb
lrwxrwxrwx 1 root root 10 Feb 12 07:19 pci-0000:00:1f.2-ata-2-part1 ->
../../sdb1
lrwxrwxrwx 1 root root 9 Feb 12 07:19 pci-0000:00:1f.2-ata-2.0 -> ../../sdb
lrwxrwxrwx 1 root root 10 Feb 12 07:19 pci-0000:00:1f.2-ata-2.0-part1 ->
../../sdb1
lrwxrwxrwx 1 root root 9 Feb 12 07:19 pci-0000:00:1f.2-ata-3 -> ../../sr0
lrwxrwxrwx 1 root root 9 Feb 12 07:19 pci-0000:00:1f.2-ata-3.0 -> ../../sr0
/dev/disk/by-uuid:
total 0
lrwxrwxrwx 1 root root 11 Feb 12 07:20 095a8d96-7d4d-4611-9ab9-4eea17277296 ->
../../loop0
lrwxrwxrwx 1 root root 10 Feb 12 07:19 3ACB3B3402737FCE -> ../../sda1
lrwxrwxrwx 1 root root 10 Feb 12 07:19 70333865-b801-4eda-ab2e-da2e5b81c9b5 ->
../../sdb1
lrwxrwxrwx 1 root root 9 Feb 12 07:19 9232-5BB6 -> ../../sdd
lrwxrwxrwx 1 root root 10 Feb 12 07:19 E50D-9066 -> ../../sda3
lrwxrwxrwx 1 root root 9 Feb 12 07:19 cd6f14214150504c -> ../../sr0
lrwxrwxrwx 1 root root 10 Feb 12 07:19 fb68085e-7d0c-4c45-9803-d2e25d9c9476 ->
../../sda2
Auto-generated on Fri, 12 Feb 2021 14:24:52 +0100 by mdadm bugscript
-- System Information:
Debian Release: bullseye/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'testing-debug'), (50, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 5.10.0-3-amd64 (SMP w/8 CPU threads)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8),
LANGUAGE=en_GB:en
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages mdadm depends on:
ii debconf [debconf-2.0] 1.5.74
ii init-system-helpers 1.60
ii libc6 2.31-9
ii lsb-base 11.1.0
ii udev 247.3-1
Versions of packages mdadm recommends:
ii exim4-daemon-light [mail-transport-agent] 4.94-15
ii kmod 28-1
Versions of packages mdadm suggests:
pn dracut-core <none>
-- debconf information excluded
diff --git a/debian/initramfs/hook b/debian/initramfs/hook
index 62c4167..1099d2a 100644
--- a/debian/initramfs/hook
+++ b/debian/initramfs/hook
@@ -93,6 +93,7 @@ else
tmpfile="${DESTMDADMCONF}.tmp"
if /usr/share/mdadm/mkconf > $tmpfile; then
cp -p $tmpfile $DESTMDADMCONF
+ rm -f $tmpfile
else
warn "failed to auto-generate temporary mdadm.conf
file."
fi
diff --git a/debian/mkconf b/debian/mkconf
index 6546c3b..7ec87e6 100644
--- a/debian/mkconf
+++ b/debian/mkconf
@@ -95,6 +95,10 @@ else
fi
fi
-echo "# This configuration was auto-generated on $(date -R) by mkconf"
+if [ -z $SOURCE_DATE_EPOCH ]; then
+ echo "# This configuration was auto-generated on $(date -R) by mkconf"
+else
+ echo "# This configuration was auto-generated on $(date -R --utc
-d@$SOURCE_DATE_EPOCH) by mkconf"
+fi
exit $error