Skip to content

Spec file fix and cleanups - #36

Merged
coiby merged 4 commits into
rhkdump:mainfrom
prudo1:fixes/spec/main
Sep 27, 2024
Merged

Spec file fix and cleanups#36
coiby merged 4 commits into
rhkdump:mainfrom
prudo1:fixes/spec/main

Conversation

@prudo1

@prudo1 prudo1 commented Sep 24, 2024

Copy link
Copy Markdown
Collaborator

This series is a follow-up from the changes included in PR #33. In particular I noticed when backporting the patches to RHEL that building the rpm failed as rpmbuild was trying to patch the wrong file. That's because the spec file contains %autospec without option -p. This will cause patch to strip all directories from the path, which ultimately means that only files in the root directory can be patched by rpmbuild. This is fixed in the 2nd commit.

The 3rd commit is a small cleanup for the initial include and should (hopefully) be obvious.

The 1st and 4th commit arise from the question on how we shall manage the spec file in the future. Especially as the spec file contained in this repo and the one from Fedora Rawhide already diverged. If there is no quick answer to the question I suggest to drop these two commits for now and only include the 2nd and 3rd one.

Note: The rpm docs strongly suggests that the 4th commit should only be included right before a version bump.

Signed-off-by: Philipp Rudo <prudo@redhat.com>
With 23df04b ("dracut: create sub-directories for dracut modules") the
dracut modules were moved to subdirectories. This causes problems when
someone wants to include a patch to the spec file to change one of the
files in those subdirectories. Reason is that '%autosetup' in the spec
file calls 'patch' per default. 'patch' however, will strip all
directories when it is called without option -p. Which means that it
will search the file in the root directory and then fail because it
cannot find it. Thus add option -p1 to '%autosetup' which will be passed
on to 'patch'. Choose -p1 as that will work with the most common patch
creation tools like git and packit.

Signed-off-by: Philipp Rudo <prudo@redhat.com>
These patch files are a left over from the original import and patch
kexec-tools and makedumpfile, which are now in separate rpms. In
addition, these patches are not mentioned in the spec file. So simply
remove them.

Signed-off-by: Philipp Rudo <prudo@redhat.com>
Simplify managing the spec file by using %autorelease and
%autochangelog. This commit was generated by

$ rpmautospec convert kdump-utils.spec

[skip changelog]

Signed-off-by: Philipp Rudo <prudo@redhat.com>
@daveyoung
daveyoung requested a review from coiby September 27, 2024 03:33

@coiby coiby left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The PR LGTM, thanks!

@coiby
coiby merged commit a627ee9 into rhkdump:main Sep 27, 2024
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

Successfully merging this pull request may close these issues.

2 participants