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

fix(release): maintain dracut-version.sh in the source tree #2450

Merged
merged 1 commit into from
Aug 25, 2023

Conversation

Henrik66
Copy link
Contributor

@Henrik66 Henrik66 commented Jul 26, 2023

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

  • I have tested it locally
  • I have reviewed and updated any documentation if relevant
  • I am providing new code and test(s) for it

@Henrik66 Henrik66 marked this pull request as draft July 26, 2023 20:36
@Henrik66 Henrik66 changed the title fix(release): generate dracut-version.sh as part of the release fix(release): maintain dracut-version.sh in the source tree Jul 26, 2023
Copy link
Member

@aafeijoo-suse aafeijoo-suse left a 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.

@LaszloGombos
Copy link
Collaborator

LaszloGombos commented Aug 1, 2023

Related bug: #2169

that some distros add its own bits after the upstream main release

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.

@LaszloGombos LaszloGombos marked this pull request as ready for review August 1, 2023 01:31
Copy link
Collaborator

@LaszloGombos LaszloGombos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@LaszloGombos
Copy link
Collaborator

CC @bdrung

@bdrung
Copy link
Contributor

bdrung commented Aug 19, 2023

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
Copy link
Contributor

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.

Copy link
Member

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.

Copy link
Contributor

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

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

@aafeijoo-suse aafeijoo-suse left a 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.
Copy link
Member

@aafeijoo-suse aafeijoo-suse left a 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!

@LaszloGombos LaszloGombos merged commit b4e23ce into dracutdevs:master Aug 25, 2023
100 of 107 checks passed
@Henrik66 Henrik66 deleted the rel3 branch August 25, 2023 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants