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

[FEATURE] Releases SHA256 file: Add file name of the ZIP #2938

Open
o-l-a-v opened this issue Jan 1, 2024 · 9 comments
Open

[FEATURE] Releases SHA256 file: Add file name of the ZIP #2938

o-l-a-v opened this issue Jan 1, 2024 · 9 comments
Labels
Milestone

Comments

@o-l-a-v
Copy link

o-l-a-v commented Jan 1, 2024

The SHA256 file included in the release is missing the name of the ZIP file for commands like sha256sum --check QOwnNotes.zip.sha256 to work.

Its' content is currently:

fb95c0816e2efc32d631b0f2b9fb555359b7c73cdaf810d70dd84c8ecbc8c594

But it'd preferably be:

fb95c0816e2efc32d631b0f2b9fb555359b7c73cdaf810d70dd84c8ecbc8c594 *QOwnNotes.zip

@pbek
Copy link
Owner

pbek commented Jan 1, 2024

When did they have the filename included?
I'm not sure if I should change that, otherwise other scripts/systems that depend on the current form might break.

@o-l-a-v
Copy link
Author

o-l-a-v commented Jan 1, 2024

Oh, maybe I should've added this as a feature request instead. AFAIK they never did.

I'd expect the file to work as any other .sha256 file, for instance created by sha256sum --binary *.

@pbek
Copy link
Owner

pbek commented Jan 1, 2024

When did they have the filename included?

see:

QOWNNOTES_ARCHIVE_MD5=`md5sum ${archiveFile} | awk '{ print $1 }' | tee ${archiveFile}.md5`
QOWNNOTES_ARCHIVE_SHA256=`sha256sum ${archiveFile} | awk '{ print $1 }' | tee ${archiveFile}.sha256`
QOWNNOTES_ARCHIVE_SHA512=`sha512sum ${archiveFile} | awk '{ print $1 }' | tee ${archiveFile}.sha512`

@o-l-a-v o-l-a-v changed the title [BUG] Releases SHA256 file is missing the file name of the ZIP [FEATURE REQUEST] Releases SHA256 file: Add file name name of the ZIP Jan 1, 2024
@o-l-a-v o-l-a-v changed the title [FEATURE REQUEST] Releases SHA256 file: Add file name name of the ZIP [FEATURE REQUEST] Releases SHA256 file: Add file name of the ZIP Jan 1, 2024
@o-l-a-v o-l-a-v changed the title [FEATURE REQUEST] Releases SHA256 file: Add file name of the ZIP [FEATURE] Releases SHA256 file: Add file name of the ZIP Jan 1, 2024
@pbek
Copy link
Owner

pbek commented Jan 1, 2024

The source code checksums were more meant to directly feed into env vars of external build systems...
I can't simply change the format of the files now.
I could only create new additional files.

@o-l-a-v
Copy link
Author

o-l-a-v commented Jan 1, 2024

Roger that. Then it's probably not worth the effort to implement it, but that's up to you to decide.

@pbek
Copy link
Owner

pbek commented Jan 1, 2024

I don't mind...

24.1.2

  • in new releases, the source code tar.xz file will now also have a .sha256sum
    and a .sha512sum file, that is compatible with sha256sum and sha512sum
    (for #2938)

@pbek pbek added Type: Feature adds functionality Importance: Low and removed Type: Support labels Jan 1, 2024
@pbek pbek added this to the 24.1.2 milestone Jan 1, 2024
@pbek
Copy link
Owner

pbek commented Jan 8, 2024

There now is a new release, could you please test it and report if it works for you?

@o-l-a-v
Copy link
Author

o-l-a-v commented Jan 8, 2024

Thanks @pbek. I was actually interested in having it for the Windows ZIP file, as I use HashCheck to validate the checksum if checksum is available. And it failed with the .zip.sha256 as the .sha256 file does not include the file name the checksum belongs to. I was just making sure thats how checksum checking on Linux works as well, thus I reported this feature request with an example from Linux.

@pbek
Copy link
Owner

pbek commented Jan 9, 2024

Oh. I'm not sure if that tool exists in the GitHub Windows images.
If you want to play around with the CI yourself and come up with a working command that doesn't break the release script you can create a pull request. 😁

You will need to add a line after those:

$(CertUtil -hashfile ..\QOwnNotes.zip SHA256)[1] -replace " ","" | Out-File -FilePath ..\QOwnNotes.zip.sha256

$(CertUtil -hashfile ..\QOwnNotes.zip SHA256)[1] -replace " ","" | Out-File -FilePath ..\QOwnNotes.zip.sha256

And a similar block after those:

- name: '📤 Release sha256 sum'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create_release.outputs.upload_url }}
asset_path: QOwnNotes.zip.sha256
asset_name: QOwnNotes.zip.sha256
asset_content_type: text/plain

- name: '📤 Upload artifact: Windows sha256sum'
uses: actions/upload-artifact@v4
with:
name: QOwnNotes.zip.sha256
path: QOwnNotes.zip.sha256

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants