-
Notifications
You must be signed in to change notification settings - Fork 401
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
fix(release): maintain dracut-version.sh in the source tree #2450
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm... the thing with the dracut-version.sh
script is that some distros add its own bits after the upstream main release number to track custom modifications, but maybe this is useful for other distros that just want the main upstream version.
Related bug: #2169
Yes, I think this is good practice but some other distributions do not include the minor packaging version - e.g. https://github.com/void-linux/void-packages/blob/master/srcpkgs/dracut/template#L40 Perhaps we can find a way to support both. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
CC @bdrung |
With my Debian/Ubuntu packaging hat on, this pull request is fine for me. The alternative is to make setting the version easier (see #2488). The third alternative would be to allow setting the full version via the configure script (that way packagers could include the minor packaging version). |
@@ -0,0 +1,3 @@ | |||
#!/bin/sh | |||
# shellcheck disable=SC2034 | |||
DRACUT_VERSION=059 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about hard-code DRACUT_VERSION
in dracut.sh
? This would save more lines of code and prevents mismatching dracut.sh
and dracut-version.sh
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it can be overridden if dracut-version.sh
exists, that looks good by me. But I wouldn't change how dracut-version.sh
can be built, it's useful for some distros out there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's talk code. Here is the proposal: #2500
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #2500 (review)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll test it properly when I have some time, but regardless you have to chmod 755 dracut-version.sh
pr-2450> ls -l dracut*.sh
-rwxr-xr-x 1 afeijoo users 3693 Aug 25 08:40 dracut-catimages.sh
-rwxr-xr-x 1 afeijoo users 31793 Aug 25 08:40 dracut-functions.sh
-rwxr-xr-x 1 afeijoo users 3599 Aug 25 08:40 dracut-initramfs-restore.sh
-rwxr-xr-x 1 afeijoo users 39298 Aug 25 08:40 dracut-init.sh
-rwxr-xr-x 1 afeijoo users 13457 Aug 25 08:40 dracut-logger.sh
-rwxr-xr-x 1 afeijoo users 94001 Aug 25 08:40 dracut.sh
-rw-r--r-- 1 afeijoo users 57 Aug 25 08:40 dracut-version.sh
Update dracut-version.sh as part of release generation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll test it properly when I have some time
All good, this does not interfere with distros that update dracut-version.sh
on their .spec file. Thanks!
Maintain dracut-version.sh file in the source tree so that each distribution does not need to generate it during distribution packaging.
Previous dracut releases dracut-056.tar.gz included a dracut-version.sh file.
Update dracut-version.sh as part of release generation.
This will include version information inside the generated release archive.
Test run: Henrik66@22cee4e
Checklist