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

Should VERSION.txt in tarballs include the git sha1? #11108

Open
smcv opened this issue Oct 7, 2024 · 3 comments
Open

Should VERSION.txt in tarballs include the git sha1? #11108

smcv opened this issue Oct 7, 2024 · 3 comments
Assignees
Milestone

Comments

@smcv
Copy link
Contributor

smcv commented Oct 7, 2024

Before 2.30.8 and 3.1.3, the SDL_REVISION would have a git sha1 and a reference to a tag in it, even in release tarballs. For example, Ubuntu 24.04 has SDL 2.30.0, and adds vendor-specific info (SDL_VENDOR_INFO) in parentheses:

ubuntu-24.04$ strings /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0|grep SDL-
SDL-release-2.30.0-0-g859844eae (Ubuntu 2.30.0+dfsg-1build3)

In 2.30.8 and 3.1.3, the new Github workflow writes a plain version number like 2.30.8 into VERSION.txt, which results in a shorter revision string:

debian-unstable$ strings /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0|grep SDL-
SDL-2.30.8 (Debian 2.30.8+dfsg-1)

Is this working as desired? It means that if for whatever reason we build more than one tarball that claims to be the same version (like the 3.1.3 release-candidate that I packaged at the end of last week, and the final 3.1.3 release), they are indistinguishable, and that seems maybe bad.

If we want the longer names back, build-release.py could run build-scripts/updaterev.sh --dist? That's what used to happen with SDL 2 when releases came from make dist with Autotools. For best results it would need to stop doing such a shallow git clone, so that for release candidates, it can see back in history as far as at least the previous tag (and for the final release, it would need to be run with the tag already created and available).

@slouken
Copy link
Collaborator

slouken commented Oct 7, 2024

@madebr, can you look at this? We should include the git hash in the revision of release archives.

@slouken slouken added this to the 3.2.0 milestone Oct 7, 2024
@smcv
Copy link
Contributor Author

smcv commented Oct 7, 2024

build-release.py could run build-scripts/updaterev.sh --dist

This also overwrites include/SDL3/SDL_revision.h with a header that hard-codes the version number, which if I remember correctly is done for the benefit of non-CMake builds, e.g. unpacking the tarball and building directly from it with something like MSVC.

@smcv
Copy link
Contributor Author

smcv commented Oct 7, 2024

Relatedly, is SDL_REVISION_SUFFIX necessary? It seems redundant with SDL_VENDOR_INFO (which is the Ubuntu 2.30.0+dfsg-1build3 or Debian 2.30.8+dfsg-1 part of my examples).

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

No branches or pull requests

3 participants