Bug 431415 - pam build fails when no audit or selinux available
Summary: pam build fails when no audit or selinux available
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: pam
Version: 8
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Tomas Mraz
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-02-04 11:19 UTC by JW
Modified: 2008-05-21 07:53 UTC (History)
0 users

Fixed In Version: Fediora 9
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-05-21 07:53:29 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.