Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copies of the same file aren't included #114

Open
sfxworks opened this issue Nov 3, 2022 · 0 comments
Open

Copies of the same file aren't included #114

sfxworks opened this issue Nov 3, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@sfxworks
Copy link

sfxworks commented Nov 3, 2022

Description

Files of the same copy with different names do not get stored.

Trying to store both a default initramfs img and fallback img into a UOR collection for booting.

    /mnt/iso/arch/boot/x86_64  sha1sum initramfs-linux-hardened.img                                                                             INT ✘ 
243bc6a8392b9c1d316cf2f08e5b0fe0ed5b2379  initramfs-linux-hardened.img
    /mnt/iso/arch/boot/x86_64  sha1sum initramfs-linux-hardened-fallback.img                                                                        ✔ 
243bc6a8392b9c1d316cf2f08e5b0fe0ed5b2379  initramfs-linux-hardened-fallback.img

As we see they're the same file, but with different names.

They are not included in the final bundle

uor inspect --reference go.registry:1338/archiso:latest | grep initramfs-linux-hardened
arch/boot/x86_64/initramfs-linux-hardened-fallback.img  sha256:6a7d6e2ed9cbc8b98af3ba128290f1a6f93c25f228a9c81fb622c7444669493d  31808830   application/zstd

UOR definitely sees these files as it passes over them when making the collection

newfstatat(AT_FDCWD, "/mnt/iso/arch/boot/x86_64/initramfs-linux-hardened-fallback.img", {st_mode=S_IFREG|0444, st_size=31808830, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/mnt/iso/arch/boot/x86_64/initramfs-linux-hardened.img", {st_mode=S_IFREG|0444, st_size=31808830, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/mnt/iso/arch/boot/x86_64/vmlinuz-linux-hardened", {st_mode=S_IFREG|0444, st_size=9758880, ...}, AT_SYMLINK_NOFOLLOW) = 0

Steps to reproduce the issue:

  1. Take a file and copy it
  2. include that file in the same directory (or a different one?)
  3. make a collection and notice one isn't there

Describe the results you received:
All files aren't in the collection

Describe the results you expected:
All files are in the collection

What version of the UOR client are you using:

UOR Client:
 Version:       v0.3.0
 Go Version:    go1.17.13
 Git Commit:    006ab2f
 Build Date:    2022-08-29T21:50:33Z
 Platform:      linux/amd64
@sfxworks sfxworks added the bug Something isn't working label Nov 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant