Skip to content

Commit

Permalink
fix: make sure file mode is same (reproducibility issue)
Browse files Browse the repository at this point in the history
This fixes the diff between local and CI builds, apparently different
`umask` for the file checked out on the host:

```
--- initramfs-amd64.xz
+++ initramfs-amd64.ci.xz
│   --- initramfs-amd64
├── +++ initramfs-amd64.ci
│ ├── rootfs.sqsh
│ │ ├── unsquashfs -d  -lls {}
│ │ │ @@ -9,15 +9,15 @@
│ │ │  -rwxr-xr-x root/root          11441016 2021-08-17 16:57 /bin/runc
│ │ │  drwxr-xr-x root/root                 3 2021-08-17 16:57 /boot
│ │ │  drwxr-xr-x root/root                 3 2021-08-17 16:57 /dev
│ │ │  drwxr-xr-x root/root               186 2021-08-17 16:57 /etc
│ │ │  lrwxrwxrwx root/root                 8 2021-08-17 16:57 /etc/ca-certificates -> /etc/ssl
│ │ │  drwxr-xr-x root/root                 3 2021-08-17 16:57 /etc/cni
│ │ │  drwxr-xr-x root/root                38 2021-08-17 16:57 /etc/cri
│ │ │ --rw-rw-r-- root/root               385 2021-08-17 16:57 /etc/cri/containerd.toml
│ │ │ +-rw-r--r-- root/root               385 2021-08-17 16:57 /etc/cri/containerd.toml
│ │ │  -rw-r--r-- root/root                 0 2021-08-17 16:57 /etc/hosts
│ │ │  drwxr-xr-x root/root                75 2021-08-17 16:57 /etc/iscsi
│ │ │  drwxr-xr-x root/root                36 2021-08-17 16:57 /etc/iscsi/ifaces
│ │ │  -rw-r--r-- root/root              5984 2021-08-17 16:57 /etc/iscsi/ifaces/iface.example
│ │ │  -rw-r--r-- root/root                54 2021-08-17 16:57 /etc/iscsi/initiatorname.iscsi
│ │ │  -rw-r--r-- root/root             13338 2021-08-17 16:57 /etc/iscsi/iscsid.conf
│ │ │  drwxr-xr-x root/root                72 2021-08-17 16:57 /etc/isns
```

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
  • Loading branch information
smira committed Aug 23, 2021
1 parent 6529288 commit 6749492
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ COPY --from=machined-build-amd64 /machined /rootfs/sbin/init
# symlinks to avoid accidentally cleaning them up.
COPY ./hack/cleanup.sh /toolchain/bin/cleanup.sh
RUN cleanup.sh /rootfs
COPY hack/containerd.toml /rootfs/etc/cri/containerd.toml
COPY --chmod=0644 hack/containerd.toml /rootfs/etc/cri/containerd.toml
RUN touch /rootfs/etc/resolv.conf
RUN touch /rootfs/etc/hosts
RUN touch /rootfs/etc/os-release
Expand Down

0 comments on commit 6749492

Please sign in to comment.