Bug 431415

Summary: pam build fails when no audit or selinux available
Product: [Fedora] Fedora Reporter: JW <ohtmvyyn>
Component: pamAssignee: Tomas Mraz <tmraz>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 8   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Fediora 9 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-05-21 07:53:29 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description JW 2008-02-04 11:19:08 UTC
Description of problem:
pam cannot be build if configured for no audit or no selinux

Version-Release number of selected component (if applicable):
pam-0.99.8.1-10

How reproducible:
Always

Steps to Reproduce:
1. Add %WITH_SELINUX 0 (and/or %WITH_AUDIT 0) to /etc/rpm/macros
2. rpm -v -ba pam.spec
3.
  
Actual results:
Still contains selinux module, and still wants to link with libaudit

Expected results:
Should be configurable as required - without selinux and/or without audit

Additional info:
It is so simple to do it right!

Start with:
  %if %{?WITH_SELINUX:0}%{!?WITH_SELINUX:1}
  %define WITH_SELINUX 1
  %endif
  %if %{?WITH_AUDIT:0}%{!?WITH_AUDIT:1}
  %define WITH_AUDIT 1
 %endif

Make sure there is:
  %if %{WITH_SELINUX}
  BuildRequires: libselinux-devel >= 1.33.2
  Requires: libselinux >= 1.33.2
  %endif

Make sure second config has:
  %if ! %{WITH_SELINUX}
        --disable-selinux \
  %endif
  %if ! %{WITH_AUDIT}
        --disable-audit \
  %endif
And modify the kludge:
  for dir in modules/pam_* ; do
  %if ! %{WITH_SELINUX}
      [ ${dir} = "modules/pam_selinux" ] && continue
  %endif
  ...

Comment 1 Tomas Mraz 2008-05-21 07:53:29 UTC
Fixed in Fedora 9 pam package.