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

RPM: Add missing BuildRequires for PAM component #13001

Merged
merged 1 commit into from
Jan 25, 2022

Conversation

ColMelvin
Copy link
Contributor

Motivation and Context

When the optional PAM binaries are included in a build, ./configure will look for security/pam_modules.h and - if it doesn't find it - recommend the user install libpam0g-dev. On Red Hat systems, pam-devel is the package that supplies this requirement; libpam0g-dev does not exist.

By encoding this requirement in the spec file, we give packagers more appropriate (and timely) recommendations for completing the build.

Description

Adds a BuildRequires: line to the spec file, but only if the PAM module is being built (i.e. -D 'with_pam 1) is given while building.

How Has This Been Tested?

Test Environment: Fedora 34 Server in a VM

Steps:

  1. Downloaded zfs v2.1.2 source package from official repository
  2. Extracted SPECS/ and SOURCES/
  3. Installed dependencies with dnf builddep zfs.spec
  4. Built with rpmbuild -bb zfs.spec, confirmed successful build
  5. Built with rpmbuild -bb zfs.spec -D 'with_pam 1', confirmed build failed
  6. Applied this patch to zfs.spec
  7. Built with rpmbuild -bb zfs.spec -D 'with_pam 1', confirmed missing dependency listed
  8. Installed dependencies with dnf builddep zfs.spec -D 'with_pam 1'
  9. Built with rpmbuild -bb zfs.spec -D 'with_pam 1', confirmed successful build

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 the optional PAM binaries are included in a build, ./configure will
look for security/pam_modules.h and - if it doesn't find it - recommend
the user install `libpam0g-dev`.  On Red Hat systems, `pam-devel` is the
package that supplies this requirement; `libpam0g-dev` does not exist.

By encoding this requirement in the spec file, we give packagers more
appropriate (and timely) recommendations for completing the build.

Signed-off-by: Chris Lindee <chris.lindee+github@gmail.com>
@behlendorf behlendorf added the Component: Packaging custom packages label Jan 24, 2022
Copy link
Contributor

@behlendorf behlendorf left a comment

Choose a reason for hiding this comment

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

Right, thanks for the packaging fix. Looks good.

@behlendorf behlendorf added the Status: Accepted Ready to integrate (reviewed, tested) label Jan 24, 2022
@behlendorf behlendorf merged commit 8d6a598 into openzfs:master Jan 25, 2022
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Feb 10, 2022
When the optional PAM binaries are included in a build, ./configure will
look for security/pam_modules.h and - if it doesn't find it - recommend
the user install `libpam0g-dev`.  On Red Hat systems, `pam-devel` is the
package that supplies this requirement; `libpam0g-dev` does not exist.

By encoding this requirement in the spec file, we give packagers more
appropriate (and timely) recommendations for completing the build.

Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Chris Lindee <chris.lindee+github@gmail.com>
Closes openzfs#13001
@ColMelvin ColMelvin deleted the fix.pam-build-requirement branch February 12, 2022 01:08
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Feb 14, 2022
When the optional PAM binaries are included in a build, ./configure will
look for security/pam_modules.h and - if it doesn't find it - recommend
the user install `libpam0g-dev`.  On Red Hat systems, `pam-devel` is the
package that supplies this requirement; `libpam0g-dev` does not exist.

By encoding this requirement in the spec file, we give packagers more
appropriate (and timely) recommendations for completing the build.

Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Chris Lindee <chris.lindee+github@gmail.com>
Closes openzfs#13001
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Feb 16, 2022
When the optional PAM binaries are included in a build, ./configure will
look for security/pam_modules.h and - if it doesn't find it - recommend
the user install `libpam0g-dev`.  On Red Hat systems, `pam-devel` is the
package that supplies this requirement; `libpam0g-dev` does not exist.

By encoding this requirement in the spec file, we give packagers more
appropriate (and timely) recommendations for completing the build.

Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Chris Lindee <chris.lindee+github@gmail.com>
Closes openzfs#13001
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Feb 17, 2022
When the optional PAM binaries are included in a build, ./configure will
look for security/pam_modules.h and - if it doesn't find it - recommend
the user install `libpam0g-dev`.  On Red Hat systems, `pam-devel` is the
package that supplies this requirement; `libpam0g-dev` does not exist.

By encoding this requirement in the spec file, we give packagers more
appropriate (and timely) recommendations for completing the build.

Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Chris Lindee <chris.lindee+github@gmail.com>
Closes openzfs#13001
nicman23 pushed a commit to nicman23/zfs that referenced this pull request Aug 22, 2022
When the optional PAM binaries are included in a build, ./configure will
look for security/pam_modules.h and - if it doesn't find it - recommend
the user install `libpam0g-dev`.  On Red Hat systems, `pam-devel` is the
package that supplies this requirement; `libpam0g-dev` does not exist.

By encoding this requirement in the spec file, we give packagers more
appropriate (and timely) recommendations for completing the build.

Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Chris Lindee <chris.lindee+github@gmail.com>
Closes openzfs#13001
nicman23 pushed a commit to nicman23/zfs that referenced this pull request Aug 22, 2022
When the optional PAM binaries are included in a build, ./configure will
look for security/pam_modules.h and - if it doesn't find it - recommend
the user install `libpam0g-dev`.  On Red Hat systems, `pam-devel` is the
package that supplies this requirement; `libpam0g-dev` does not exist.

By encoding this requirement in the spec file, we give packagers more
appropriate (and timely) recommendations for completing the build.

Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Chris Lindee <chris.lindee+github@gmail.com>
Closes openzfs#13001
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.

3 participants