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

Make sure all necessary RPM path macros are defined #15756

Merged
merged 1 commit into from
Jan 16, 2024

Conversation

Lalufu
Copy link
Contributor

@Lalufu Lalufu commented Jan 11, 2024

Motivation and Context

When building (s)rpm files through the Makefile, a directory structure is created in /tmp to hold the various files.

In case the user running the command has overridden some of the RPM path settings through their user profile (for example in ~/.rpmmacros), these paths do not line up with the configuration, and the build fails.

Make sure all paths used are properly defined.

How Has This Been Tested?

  1. As a user, create a ~/.rpmmacros file with the following content (as an example):
%_topdir                %(echo $HOME)/rpmbuild
%_tmppath               %{_topdir}/TEMP
%_builddir              %{_tmppath}/BUILD

%_rpmtopdir             %{_topdir}/RPM/%{name}
%_sourcedir             %{_rpmtopdir}
%_specdir               %{_rpmtopdir}
%_rpmdir                %{_topdir}/RPMS
%_srcrpmdir             %{_topdir}/RPMS
%_rpmfilename           %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm
  1. Without this patch applied, do a ./autogen.sh ; ./configure ; make -j1 srpm run
  2. Observe it will fail with errors about failing to find some files
  3. Apply the patch
  4. Repeat step 2)
  5. Observe that the build succeeds

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Library ABI change (libzfs, libzfs_core, libnvpair, libuutil and libzfsbootenv)
  • Documentation (a change to man pages or other documentation)

Checklist:

When building (s)rpm files through the Makefile, a directory structure
is created in /tmp to hold the various files.

In case the user running the command has overridden some of the RPM path
settings through their user profile (for example in `~/.rpmmacros`),
these paths do not line up with the configuration, and the build fails.

Make sure all paths used are properly defined.

Signed-off-by: Ralf Ertzinger <[email protected]>
@Lalufu Lalufu force-pushed the lalufu/bugfix-rpm-macros branch from 303522d to 24e9b96 Compare January 11, 2024 10:22
@behlendorf behlendorf added Component: Packaging custom packages Status: Code Review Needed Ready for review and testing labels Jan 12, 2024
@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Jan 16, 2024
@behlendorf behlendorf merged commit ef00da8 into openzfs:master Jan 16, 2024
22 of 26 checks passed
behlendorf pushed a commit to behlendorf/zfs that referenced this pull request Jan 29, 2024
When building (s)rpm files through the Makefile, a directory structure
is created in /tmp to hold the various files.

In case the user running the command has overridden some of the RPM path
settings through their user profile (for example in `~/.rpmmacros`),
these paths do not line up with the configuration, and the build fails.

Make sure all paths used are properly defined.

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ralf Ertzinger <[email protected]>
Closes openzfs#15756
behlendorf pushed a commit that referenced this pull request Jan 29, 2024
When building (s)rpm files through the Makefile, a directory structure
is created in /tmp to hold the various files.

In case the user running the command has overridden some of the RPM path
settings through their user profile (for example in `~/.rpmmacros`),
these paths do not line up with the configuration, and the build fails.

Make sure all paths used are properly defined.

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ralf Ertzinger <[email protected]>
Closes #15756
lundman pushed a commit to openzfsonwindows/openzfs that referenced this pull request Mar 13, 2024
When building (s)rpm files through the Makefile, a directory structure
is created in /tmp to hold the various files.

In case the user running the command has overridden some of the RPM path
settings through their user profile (for example in `~/.rpmmacros`),
these paths do not line up with the configuration, and the build fails.

Make sure all paths used are properly defined.

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ralf Ertzinger <[email protected]>
Closes openzfs#15756
lundman pushed a commit to openzfsonwindows/openzfs that referenced this pull request Mar 13, 2024
When building (s)rpm files through the Makefile, a directory structure
is created in /tmp to hold the various files.

In case the user running the command has overridden some of the RPM path
settings through their user profile (for example in `~/.rpmmacros`),
these paths do not line up with the configuration, and the build fails.

Make sure all paths used are properly defined.

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ralf Ertzinger <[email protected]>
Closes openzfs#15756
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Packaging custom packages Status: Accepted Ready to integrate (reviewed, tested)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants