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

[Bug]: remove directories from sha files #7731

Closed
1 of 2 tasks
leggewie opened this issue Jan 21, 2025 · 8 comments
Closed
1 of 2 tasks

[Bug]: remove directories from sha files #7731

leggewie opened this issue Jan 21, 2025 · 8 comments
Labels
Bug Something isn't working as it should Good first issue Feel free to contribute :)

Comments

@leggewie
Copy link

What happened?

$ cat Armbian_23.8.1_Bananapim2plus_jammy_current_6.1.47_minimal.img.xz.sha
59a2f556f497bbe6a99f71a9a35736beadacaff495ab67fef198b799ba0b53d6 */armbian/.tmp/image-679d4d6c-dbbb-4915-ba5c-0f466f3924b9/Armbian_23.8.1_Bananapim2plus_jammy_current_6.1.47_minimal.img.xz

I think it would be better to remove the subdirectories from the publish sha files, either by switching first into the subdirectory before computing the sha256sum or after the creation via sed 's!\*/armbian/\.tmp/!!' or something similar.

Am I correct to think the creation of the sha files happens via lib/functions/general/hash-files.sh?

How to reproduce?

download and image and try to verify via sha256sum from the CLI

Branch

main (main development branch)

On which host OS are you running the build script and observing this problem?

Ubuntu 24.04 Noble

Are you building on Windows WSL2?

  • Yes, my Ubuntu/Debian/OtherOS is running on WSL2

Relevant log URL

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@leggewie leggewie added the Bug Something isn't working as it should label Jan 21, 2025
Copy link
Contributor

Hey @leggewie !

Looks like it's your first time interacting with Armbian here on GitHub.

Welcome and thank you for taking the time to report an issue ❤️.

Don't forget to star ⭐ the repo.

@github-actions github-actions bot added the Good first issue Feel free to contribute :) label Jan 21, 2025
Copy link
Contributor

github-actions bot commented Jan 21, 2025

Jira ticket: AR-2590

@igorpecovnik
Copy link
Member

Armbian_23.8.1_

Can you check latest images first.

@leggewie
Copy link
Author

leggewie commented Feb 9, 2025

Armbian_23.8.1_

Can you check latest images first.

That's the latest release for the board in question. In any case, it's the same for other boards, too.

+--[ https://dl.armbian.com/bananapim7/Noble_current_gnome-kisak.sha ]
|
| 384c9c14cd85332eb8b775c7ef12a03ff2ba9dab417a0e2e46085b893e52bd60 */armbian/.tmp/image-no-uuidgen-yet-14101-7914/Armbian_24.11.1_Bananapim7_noble_current_6.12.0-rc7_gnome-kisak_desktop.img.xz
|
+--
+--[ https://dl.armbian.com/bananapim7/Bookworm_vendor_minimal.sha ]
|
| 11d17e5e0ce4020e297453c8f60d8f17200f2efb9463dc75cd96fa3d6192653e */armbian/.tmp/image-a64143f6-3d2a-47b5-9c1d-d265076839e8/Armbian_24.11.1_Bananapim7_bookworm_vendor_6.1.75_minimal.img.xz
|
+--

@igorpecovnik
Copy link
Member

I see, yes, its a bug. Thanks.

@igorpecovnik
Copy link
Member

This works now, perhaps it can be solved in more elegant way?

@leggewie
Copy link
Author

Thank you. Well done!

Since you're asking. There's more than 1 way to skin the cat, of course. I am not so proficient with awk or the build code of armbian, for what it's worth. But here are some alternative ways of doing it.

  • cd into the directory before running sha256sum to avoid having to strip the information at all
  • I spotted a number of uses of cut -d -f around hash-files.sh, this could be used here as well for consistency
  • generic sed

@igorpecovnik
Copy link
Member

I'll just go with this. Tnx, lets close this down.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working as it should Good first issue Feel free to contribute :)
Development

No branches or pull requests

2 participants